January 2018
Intermediate to advanced
414 pages
10h 29m
English
In a UNIX system, when we need to run a JAR as a process, either init.d or systemd, we can't just run the JAR itself, we may need to create a shell script to launch our application calling the Java command line, too. Spring, if configured to do so, will create a special script at the beginning of the JAR file that will allow it to be used as an executable.
We need to modify our POM to add this feature, under the build/plugins tags:
<build>.... <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <executable>true</executable> </configuration> </plugin>....</build>
Now we can directly invoke our JAR as a script, for example from the command ...
Read now
Unlock full access