What the generated Spring Boot app contains
Application structure (Layered architecture)
src/main/java/com/{package}/
config/
SecurityConfig.java # Spring Security filter chain + JWT
DatabaseConfig.java # DataSource, transaction manager
CorsConfig.java
controller/
AuthController.java # POST /auth/login, /auth/refresh
{Entity}Controller.java # @RestController per entity
service/
AuthService.java
EmailService.java # Spring Mail (SendGrid/SES)
{Entity}Service.java # business logic, transaction boundaries
repository/
{Entity}Repository.java # extends JpaRepository<{Entity}, UUID>
model/
{Entity}.java # @Entity + @Table with indexes
User.java
Workspace.java
dto/
{Entity}Request.java # @Valid annotated request DTOs
{Entity}Response.java # response projection (no entity leaks)
ErrorResponse.java
exception/
GlobalExceptionHandler.java # @ControllerAdvice, consistent error format
{Entity}NotFoundException.java
security/
JwtTokenProvider.java
JwtAuthenticationFilter.java
src/main/resources/
application.properties # ${env:DATABASE_URL} format, no hardcoding
db/migration/
V1__create_users.sql
V2__create_workspaces.sql
V{n}__create_{entity}.sql # one Flyway migration per entity
src/test/java/com/{package}/
controller/
{Entity}ControllerTest.java # @SpringBootTest + MockMvc
service/
{Entity}ServiceTest.java # @ExtendWith(MockitoExtension.class)
pom.xml # (or build.gradle)
Dockerfile
docker-compose.yml
Makefile
openapi.yaml
Database layer
- Spring Data JPA with Hibernate — no raw SQL for queries
- Flyway migrations — one
.sqlfile per entity, version-controlled @Indexannotations on all foreign key columns- Multi-tenant scoping:
@Filteror explicitworkspace_idparameter on every protected query - Optimistic locking (
@Version) on aggregate root entities - PostgreSQL — never H2 in production config
Auth and security
- JWT issued as httpOnly, Secure, SameSite=Lax cookies
JwtAuthenticationFiltervalidates token on every request, setsSecurityContextBCryptPasswordEncoderfor password hashing@PreAuthorizemethod-level security for fine-grained permissions- All secrets via
${env:SECRET_KEY}— never hardcoded - Rate limiting on auth endpoints via Bucket4j
API design
- REST controllers with
@RequestMapping("/api/v1/{entities}") - Routes match the generated OpenAPI 3.1 spec (documented via SpringDoc OpenAPI)
{Entity}ResponseDTO on every response — never return@Entitydirectly- Consistent error format:
{"error": "snake_case_code", "message": "Human readable description."} - 201 for creation, 422 for validation errors (via
@Valid), 403 for permission, 404 for not found - Pagination via Spring Data's
Pageable+Page<T>response wrapper
Tests
- JUnit 5 + Mockito + MockMvc test suite
@SpringBootTestwith@AutoConfigureMockMvcfor integration tests@DataJpaTestwith Testcontainers PostgreSQL for repository tests- Auth tests: token issuance, expiry, refresh, unauthorized access enforcement
- Controller tests: HTTP status codes, validation errors, authorization
- Service tests: business logic, exception scenarios
Infrastructure
- Multi-stage Dockerfile (eclipse-temurin:21-jdk-alpine build → JRE runtime — ~180MB final image)
docker-compose.yml: Spring Boot app + PostgreSQL + Redis (for session store / rate limiting)Makefile:make dev,make test,make migrate- GitHub Actions:
checkstyle→maven verify(orgradle check) →docker build→ deploy
Spring Boot vs Micronaut vs Quarkus
Choose Spring Boot when:
- Your enterprise team already knows the Spring ecosystem
- You need the broadest library compatibility (Spring integrates with everything)
- Long-term support and documented migration paths matter
- Hiring Java developers from a large talent pool
Choose Micronaut/Quarkus when:
- Cold start time is critical (serverless, Kubernetes horizontal scaling)
- You want native compilation via GraalVM
Spring Boot is the correct default for enterprise Java. It has the largest community, the most comprehensive documentation, and the widest integration ecosystem. Archiet generates Spring Boot.
vs Spring Initializr
Spring Initializr (start.spring.io) generates a skeleton with selected dependencies. It gives you zero domain-specific code.
Archiet generates the full application: your JPA entities, your Flyway migrations, your repositories, your services, your controllers, your tests — everything that constitutes your actual product.
CTA
Generate a complete Spring Boot + Next.js application from your requirements — free plan, no credit card.
Describe your product, pick Java Spring Boot, download a production-ready codebase in 90 seconds.
Start free at archiet.com.