We've hacked out a suitable application. Now it's time to take it to production. As Spring Developer Advocate Josh Long likes to say, production is the happiest place on earth.
The good ol' spring-boot-gradle-plugin has built-in hooks to handle that for us. By invoking Gradle's build task, it will insert itself into the build process, and create a JAR file.
$ ./gradlew clean build :clean :compileJava :processResources :classes :findMainClass :jar :bootRepackage :assemble :compileTestJava :processTestResources UP-TO-DATE :testClasses :test ... test output ... :check :build BUILD SUCCESSFUL Total time: 10.946 secs
If we peek at the output, we'll find the original JAR file (non-FAT) along with ...