- Mastering Microservices with Java 9(Second Edition)
- Sourabh Sharma
- 150字
- 2021-07-02 21:54:46
Running the Maven tool
This method may not work because Java 9, Spring Boot 2, and Spring Framework 5 are all in either in early or snapshot release. In case it does not work, please use a project using Java commands.
Here, we use the Maven tool to execute the generated JAR file, the steps for this are as follows:
- Right-click on the pom.xml file.
- Select Run Maven | Goals... from the pop-up menu. It will open the dialog. Type spring-boot:run in the Goals field. We have used the released version of Spring Boot in the code. However, if you are using the snapshot release, you can check the Update Snapshots checkbox. To use it in the future, type spring-boot-run in the Remember as field.
- Next time, you could directly click Run Maven | Goals | spring-boot-run to execute the project:

Run Maven dialog
- Click OK to execute the project.