generator-springboot-api

View on GitHub

How this springboot-api generator works

The generator-springboot-api is a yeoman generator that builds a springboot microservices from scratch. Its goal is to assemble a pre-configured, compilable and ready-to-code spring-boot project.

Installation

Prerequisites

  1. Java JDK 11 or newer (can be an open-jdk distro)
  2. Maven 3+
  3. NPM
  4. Yeoman
  5. docker
  6. docker-compose

To install yeoman:

$ npm install -g yo@latest

To install this generator:

$ npm install -g generator-springboot-api

Features

Generation of fully-functional springboot REST API, using:

Integrations

This generator allows to integrate the springboot REST API with:

Additionally, this generator creates:

Get started

Remember you must install npm, yeoman and generator-springboot-api before use them. See the Prerequisites above.

Open your shell (or powershell) and type these follow commands:

$ yo springboot-api

After this simple options, the generator will assembly your springboot api, using all the choosen resources.

$ cd path_to_your_app
$ mvn package -U
$ cd target

Setting up the complete stack on local machine

If you want to set up the complete docker stack, use the shell script stack.sh. This script will start all the docker services to support the integrations of your microservice to run it in you local machine.

The script above will create all the docker services necessary to start up your microservice. So you can import the maven project in your favourite IDE and start to code and debug.

Note: In order to use docker stack and docker service you must initialize the swarm-mode before:

$ docker swarm init