generator-macchiato
Java backend service generator
This repo has the intend to create the ability to bootstrap fast a rest Java back-end service with less quesitons needed.
For that somethings will need to be default, as the structured logs/Heroku and Travis configurations
.
To install the project:
npm install -g generator-macchiato
To run:
yo macchiato
To succefull run the project you will need:
- Git
- Gradle
- Docker
- Java 8
- Eclipse/IntelliJ
This project will create for you:
- The clock configuration to be able to inject Clock to LocalDate to be able to unit test.
- Gradle build file with configurations to support heroku/travis integrations as docker and postgres if you select this option.
- It will add the configuration to have Structure Logs with Logback, and Some aspects to help you log the application using MDC.
This is the structure that macchiato will generate:
project
β .travis.yml
β .gitignore
β Procfile
β build.gradle
ββββgradle
β ββββscripts
β β β java.gradle
β β β spring-boot.gradle
β β β postgres-docker.gradle
β β β test.gradle
β
ββββsrc/main/java/<%defaultPackage%>
β β Application.java
β β
β ββββconfig
β β β ClockConfiguration.java
β β β PropertiesConfiguration.java
β ββββcontroller
β β GlobalExceptionHandler.java
β
ββββsrc/main/resources
β β application.properties
β β application-local.properties
β β logback.xml
β
ββββsrc/test/java/<%defaultPackage%>
β β Application.java
β
ββββsrc/test/resources
β application-test.properties