WARNING: the last version of Bootique that supports bootique-kotlin is 2.x (ok, technically, 3.0.M2). It is not distributed (or compatible) with Bootique 3.0 or newer.
A simple example that explains how to write Bootique application with Kotlin.
For additional help/questions about this example send a message to Bootique forum.
You can find different versions of framework in use at
- Java 1.8 or newer.
Here is how to build it:
git clone git@github.com:bootique-examples/bootique-kotlin-demo.git
cd bootique-kotlin-demo
./gradlew installDistNow you can check the options available in your app:
$ ./build/install/bootique-kotlin-demo/bin/bootique-kotlin-demo
NAME
bootique-kotlin-demo-1.0-SNAPSHOT.jar
OPTIONS
-c yaml_location, --config=yaml_location
Specifies YAML config location, which can be a file path or a URL.
-h, --help
Prints this message.
-H, --help-config
Prints information about application modules and their configuration options.
-s, --server
Starts Undertow server.And run it:
$ ./build/install/bootique-kotlin-demo/bin/bootique-kotlin-demo --server --config=classpath:config.bq.ktsThen open http://localhost:9988 in browser.