Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Spring Project BoilerplateNew to Visual Studio Code? Get it now.
Spring Project Boilerplate

Spring Project Boilerplate

altmemy

|
41 installs
| (0) | Free
Quickly generate a standard folder structure for Spring Boot projects, including model, controller, service, repository, dto and mapper directories, to help you start coding faster.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Spring Project Boilerplate

Spring Project Boilerplate
Accelerate. Generate. Focus.

VS Code Marketplace Version Downloads Rating Spring Boot 3.x License

Transform your development workflow with a powerful VS Code extension that eliminates repetitive code creation and enforces best practices for Java & Spring Boot. Scaffold complete enterprise-ready projects in seconds.

🌟 What Sets Us Apart

Unlike generic code generators, Spring Project Boilerplate:

  • Intelligently analyzes your existing code structure
  • Seamlessly integrates with your existing projects
  • Creates context-aware components that follow Spring Boot best practices
  • Reduces technical debt with consistent, well-structured code

✨ Key Features

🚀 Complete Project Scaffolding

Instantly bootstrap a professional Spring Boot architecture with all essential layers pre-configured.

  • Clean, consistent package structure (Layered pattern)
  • Best practice folder organization
  • Supports both Maven and Gradle projects

⚡ Full CRUD Generation

Transform an Entity into a full backend stack with one click:

  • Entity → Repository → Service → Controller
  • Standard CRUD endpoints (GET, POST, PUT, DELETE)
  • All layers properly connected and annotated

🔄 DTO & Mapper Integration

Promote clean API design with automatic DTO & Mapper scaffolding:

  • Choose between standard Java class or MapStruct interface
  • Ready-to-edit conversion methods included
  • Separation of concerns is built-in
  • Field-level mapping coming soon

🔍 Intelligent Context Menus

Adaptive UI that shows only relevant options for your current folder or file:

  • Right-click on relevant folders for targeted generation
  • Automatic package detection (standard structure)
  • Clear, informative feedback on each action

🛡️ Spring Security Scaffolding

Generate up-to-date Spring Security configuration files (Java-based, Spring Boot 3+ style) instantly.

  • Best-practice SecurityConfig template
  • Customizable for your project's needs

🛠️ Generate Missing Layers

Don't repeat yourself—automatically create missing Controllers, Services, or Repositories for all Entities.

  • Scan existing models to fill in missing backend layers
  • No risk of overwriting your code

Note:

  • Currently optimized for the standard (Layered) Spring Boot architecture. Hexagonal/Clean/DDD patterns can be used by manually reorganizing folders and applying commands in each context.
  • Field-level customization and additional architecture support are planned for future updates.

📊 Productivity Impact

Spring Project Boilerplate lets you automate the boring parts of Spring Boot development.

  • Instantly generate standard project structure and boilerplate code.
  • Create full CRUD stacks, DTOs, Mappers, and security classes in seconds.
  • Spend less time on setup and more time on business logic.

Save hours every week and keep your codebase clean, consistent, and production-ready.

Your feedback helps us improve! Try it out and let us know what features you want next.


🚀 Getting Started

Prerequisites

  • Java Development Kit: JDK 17+ (JDK 21+ recommended)
  • VS Code: v1.100.0 or newer
  • Spring Boot: Compatible with versions 2.7.x through 3.2.x
  • Project Structure: Standard Maven or Gradle layout (src/main/java/...)

Installation

  1. Open VS Code
  2. Go to Extensions (Ctrl+Shift+X)
  3. Search for Spring Project Boilerplate
  4. Click Install

Quick Start Guide

📂 Create Complete Project Structure

  1. Right-click on the src folder
  2. Select Spring Project Boilerplate → Create Spring Boot Structure
  3. Your project will instantly have the following structure:
src/main/java/com/example/yourproject/
├── model/
├── repository/
├── service/
├── controller/
├── dto/
└── mapper/

🧩 Create Entity with Full CRUD Stack

  1. Right-click on src folder
  2. Select Create Entity with Layers
  3. Enter your entity name (e.g., Product)
  4. The extension automatically generates:
    • Product.java (Entity with JPA annotations)
    • ProductRepository.java (Spring Data JPA interface)
    • ProductService.java (Service with standard CRUD operations)
    • ProductController.java (REST controller with endpoints)

🗂️ Create Entity (Model Only)

  1. Right-click on src folder
  2. Select Create Entity (Model Only)
  3. Enter your entity name
  4. Only the Entity class will be created in the model folder, ready for your customization

🔄 Generate DTO & Mapper for Existing Entities

  1. Right-click on any Entity class in the model folder
  2. Select Generate DTO & Mapper
  3. Choose your preference:
    • Standard Java mapper (manual implementation)
    • MapStruct interface (requires dependency)

🔍 Find & Generate Missing Components

  1. Right-click on any layer folder (e.g., controller/, service/, repository/)
  2. Select the corresponding Generate Missing ... action
  3. The extension scans your project, finds Entities missing that layer, and generates the necessary files automatically

🛡️ Generate Spring Security Classes

  1. Right-click on the src folder
  2. Select Generate Spring Security Classes
  3. The extension will create up-to-date SecurityConfig.java and related configuration files using best practices for Spring Boot 3+
  4. Easily extend or customize as needed for your application's security requirements

⚠️ Generate Global Exception Handler

  1. Right-click on the src folder
  2. Select Generate Global Exception Handler
  3. The extension will create a standard GlobalExceptionHandler.java class under your base package,
    pre-configured with @RestControllerAdvice and example handler methods.


Tip: All actions are context-aware. Only relevant options are shown for each folder or file to keep your workflow clean and focused.

📸 See It In Action

Project Structure Creation Entity with Layers DTO & Mapper Generation
Structure Creation Entity Layers DTO Mapper

🧠 Advanced Usage

Security Configuration Example

When you use Generate Spring Security Classes, the extension creates a modern and clean Spring Security config for Spring Boot 3.x:

@Configuration
@EnableWebSecurity
public class SecurityConfig {

    @Bean
    public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
        return http
            .csrf(csrf -> csrf.disable())
            .authorizeHttpRequests(auth -> auth
                .requestMatchers("/api/public/**").permitAll()
                .anyRequest().authenticated()
            )
            .sessionManagement(session -> session
                .sessionCreationPolicy(SessionCreationPolicy.STATELESS)
            )
            .httpBasic(Customizer.withDefaults())
            .build();
    }

    // You can extend or customize authentication beans as needed
}

🛠️ Troubleshooting

Common Issues & Solutions

Extension doesn't detect my project structure

Solution: Make sure your project follows the standard Spring Boot layout (src/main/java/...).


MapStruct mapper doesn't compile

Solution: If you choose MapStruct mappers, add MapStruct dependencies to your pom.xml or build.gradle:

<dependency>
    <groupId>org.mapstruct</groupId>
    <artifactId>mapstruct</artifactId>
    <version>${org.mapstruct.version}</version>
</dependency>


Generated code doesn't match your preferred style

Solution: Edit the generated code as needed. (Customizable templates coming soon.)


📝 Release Notes

1.1.0 (Latest)

  • Added Spring Boot 3.2+ support
  • Improved detection for DTO generation

1.0.0

  • Initial release: project structure, CRUD generation, DTO/Mapper, Security classes

🔮 Roadmap

  • Field-level customization for DTOs and Mappers
  • Unit & integration test class generation
  • Custom code templates
  • Database schema import for entity generation

❤️ Support & Contribution

  • GitHub: Open issues or contribute
  • LinkedIn: Connect on LinkedIn
  • Twitter (x): @altmemy199

Empowering Java & Spring Boot developers with modern, automated project scaffolding.

Apache 2.0 License  |  View on GitHub  |  VS Code Marketplace

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft