Project structure
springboot-cli creates a standard Maven Spring Boot project, then adds springboot-cli.json and a small set of files for its monolith architecture.
Package-by-layer layout
Generated Java components go into packages under the configured project.basePackage:
| Component | Package directory | Example class |
|---|---|---|
| Controller | controller | ProductController.java |
| Service | service | ProductService.java |
| Repository | repository | ProductRepository.java |
| Entity | domain | Product.java |
| DTO | dto | ProductDTO.java |
| Configuration | config | ProductConfig.java |
| Listener | listener | ProductListener.java |
| Exception | exception | ProductException.java |
The initial project also contains GlobalExceptionHandler, ResourceNotFoundException, and a test that checks the layer dependency rules. Component templates are starting points: for example, generated services and repositories are empty skeletons and need application-specific behavior.
springboot-cli.json
The project-root config records the project name, Maven coordinates, Java and Spring Boot versions, package, architecture, and entity schema path. The $schema property enables editor assistance. See the configuration reference for every field.
Project commands search upward from the current directory for springboot-cli.json, so commands can run from the project root or a subdirectory.
Two entity-generation paths
springboot-cli add entity --name Productcreates a plain Java class skeleton in thedomainpackage.springboot-cli schema applycreates JPA entity classes from a project entity definition file, including table and field annotations.
These are separate workflows. See Schema-driven entities before using the second one.