Grow Your Spring Project
Sprout is an opinionated scaffolding engine made to spare developers from the boilerplate that comes with working with Spring, including Repositories, Services, DTOs, Mappers, Controllers, and exceptions.
It is a CLI tool that generates the entirety of the aforementioned parts of the application and keeps the liberty to edit or tweak to the developer. It is smart, capable, and will generate production-ready code.
Point Sprout to your entity package and let your project grow.
@Entity
public class User {
@Id
private Long id;
}
1. Write your Entity
$ sprout
Processing User...
✔ Scaffolding complete.
$
2. Run Sprout
📁 src/main/java/myapp/
📁 controller/
📄 UserController.java
📁 repository/
📄 UserRepository.java
3. Ready to Develop
Documentation
How to use
sprout: The base command to execute the scaffolding engine.
Flags:
--dir="path": Specify the directory containing the .entity package. (Note: If used without this flag, it will default to the current directory.)-p, --partial: Toggle partial generation, generate only one component for the entirety of the provided entities (not recommended).
Sub-flags (needs -p or --partial):
-r, --repository: Generate repositories-d, --dto: Generate DTOs-m, --mapper: Generate mappers-s, --service: Generate services-c, --controller: Generate controllers-e, --exception: Generate exceptions
Install Sprout
Sprout is distributed via package managers for seamless installation and updates.
Windows
Install via Scoop
scoop bucket add AmineSidki https://github.com/AmineSidki/scoop-sprout.git && scoop install sprout
Post-Installation
- Verify the installation was successful by running
sprout --versionin your terminal. - Head over to the Documentation to see how to use the CLI flags.