generator-macchiato

Spring boot Application backend generator.


Keywords
yeoman-generator, spring-boot, java
License
MIT
Install
npm install generator-macchiato@0.0.2

Documentation

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