Developing Java Applications with Spring and Spring Boot
by Claudio Eduardo de Oliveira, Greg L. Turnquist, Alex Antonov
How it works...
With a small customization to launch.script, we were able to create a self-executing deployable application, packaged as a self-contained JAR file, which on top of everything else can also be configured in order to be launched using the various OS-specific autostarting frameworks.
The Spring Boot Gradle and Maven plugins provide us with lots of options for parameter customization and even an ability to embed mustache-like template placeholders in launch.script, which can later be replaced with values during build time. We have leveraged this capability to inject our JVM arguments into the file using the launchScript{properties} configuration setting.
In our custom version of launch.script, we added the jvmopts="{{jvm_options:}}" ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access