Template produces self-executable jar with API at localhost.
- Make sure you are signed in to your GitHub account, then just
click
here
to use template. App.kt
file is entry point.
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
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.
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.
You can use multi-field value classes for your entities.
You can download TypeScript definitions for es6 imports
using an intention action.
ES6 imports example: main.js.