A ClI based tool to generate fully functional spring-boot microservices. Its based on Yeoman tool for CLI interpretation.
> npm install -g yo
> npm install -g generator-springbootms
> yo springbootms
> git clone https://github.com/amareshk8/api-generator.git
> cd generator-springbootms
> npm install
> npm link
> yo springbootms
> cd MyService
> yo springbootms:endpoint entityname --base-path /path
-
Microservice
- SpringBoot REST API with jar type packaging.
- CORS configuration
- Swagger UI Integration
- Spring Data JPA integration with option to select databases like MySQL, Postgresql, MariaDB etc
- Flyway or Liquibase data migration support
- SpringBoot Actuator configuration
- Integration with Config Server, Service Registry, Sleuth, Zipkin
- TestContainers integration(Local Docker Setup is mandatory)
- JUnit 5
- Docker configuration for Application, ELK, Prometheus, Grafana
- Jenkinsfile,TravisFile,
- manifest.yml for PCF deployment.
- Dockerfile for service.
-
Spring Cloud Config Server
- Config Server with Git and native backend configuration
-
Service Registry
- Service Registry based on Netflix Eureka
You can generate REST API with CRUD operation using the following command:
🔆 You should run the following command from within the generated project folder.
The command to generate endpoints and subsequent file is "yo springbootms:endpoint entityname --base-path path"
eg. MyService> yo springbootms:endpoint Customer --base-path /api/customers
This will generate:
- JPA entity
- Spring Data JPA Repository
- Service
- Spring MVC REST Controller with CRUD operations
- Unit and Integration Tests for REST Controller
- Flyway or Liquibase migration to create table