Spring Project Boilerplate
Accelerate. Generate. Focus.
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
- Open VS Code
- Go to Extensions (
Ctrl+Shift+X
)
- Search for Spring Project Boilerplate
- Click Install
Quick Start Guide
📂 Create Complete Project Structure
- Right-click on the
src
folder
- Select Spring Project Boilerplate → Create Spring Boot Structure
- 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
- Right-click on
src
folder
- Select Create Entity with Layers
- Enter your entity name (e.g.,
Product
)
- 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)
- Right-click on
src
folder
- Select Create Entity (Model Only)
- Enter your entity name
- Only the Entity class will be created in the
model
folder, ready for your customization
🔄 Generate DTO & Mapper for Existing Entities
- Right-click on any Entity class in the
model
folder
- Select Generate DTO & Mapper
- Choose your preference:
• Standard Java mapper (manual implementation)
• MapStruct interface (requires dependency)
🔍 Find & Generate Missing Components
- Right-click on any layer folder (e.g.,
controller/
, service/
, repository/
)
- Select the corresponding Generate Missing ... action
- The extension scans your project, finds Entities missing that layer, and generates the necessary files automatically
🛡️ Generate Spring Security Classes
- Right-click on the
src
folder
- Select Generate Spring Security Classes
- The extension will create up-to-date
SecurityConfig.java
and related configuration files using best practices for Spring Boot 3+
- Easily extend or customize as needed for your application's security requirements
⚠️ Generate Global Exception Handler
- Right-click on the
src
folder
- Select Generate Global Exception Handler
- 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 |
 |
 |
 |
🧠 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
Empowering Java & Spring Boot developers with modern, automated project scaffolding.
Apache 2.0 License |
View on GitHub |
VS Code Marketplace