-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Hands-On Microservices with Kotlin
By :

Now that we know something more about building microservices within Spring Boot, we need to package and run our service. This will teach us how to package a Spring Boot application.
Then, we will analyze the difference between packaging, using JARs or WARs.
Finally, we learn how to run the package applications, and how to creating self-executables JARs.
We can package the application using the Maven lifecycle phase package, either using the IntelliJ Maven projects window or from the command line.
We can open a command line to the project folder from IntelliJ using the terminal window from the menu—View
| Tool Windows
| Terminal
or using the Alt + F12 keybinding.
mvnw package
Running this from our example project will create a file named chapter2-0.0.1-SNAPSHOT.jar
under the target
folder.
This command will create a JAR that contains all dependencies required by the application that we are packaging, in our case all the Spring components...