Skip to content
/ microservice Public template
generated from demidko/BookQuote

Spring Boot Web application template

License

Notifications You must be signed in to change notification settings

demidko/microservice

Repository files navigation

Microservice

Template produces self-executable jar with API at localhost.

Usage

  1. Make sure you are signed in to your GitHub account, then just click here to use template.
  2. App.kt file is entry point.

Build with Java

Execute ./gradlew clean build. Your jar will be located at ./build/libs with -boot.jar postfix. Now you can run:

java -jar --enable-preview build/libs/application-boot.jar

Or, build with Docker

Execute docker build . -t app. Your image will be located at docker images -a. Now you can run:

docker run -v `pwd`:`pwd` -w `pwd` -it --rm -p 80:8080 app

Rest API will available at your localhost.

FYI

Spring Boot Params

If you specify, for example, the annotation

@Value("\${myCalendars.url:http://default-calendar.com}")
lateinit var myCalendarUrl

then the value will be taken from the environment variable MYCALENDAR_URL. In addition, such a variable can also be set in the usual way, from the application.yml file or from command line parameters.

Kotlin value classes

You can use multi-field value classes for your entities.

Code completion for es6 imports in IntelliJ IDEA

You can download TypeScript definitions for es6 imports using an intention action.
ES6 imports example: main.js.