idea Spring-boot of the three startup modes

Because of the new Spring-Boot start of the project will be reported Whitelabel Error Page, so I created a Test class url interface / hello, GET request method

The first way to start:


This mode is equivalent to start Main We start with the same

The second way to start:


Cmd into the environment, the path is switched to the project, and then enter mvn spring-boot: run the transport, the project can be started

Note: Method three is also a project to deploy Linux server approach
a third way to start:


And a second method, like, enter cmd environment, switch to the project, and then compile the project,
the Spring project to compile the Boot method: mvn install
the project compile successfully page


Compile successfully in the target file in the project will be more than a jar file, so we switch to the target file, and then view the
file cmd (under windows to view the folder enter the command dir not see in Linux using li, attention! !)


Then we start the development project, enter java -jar compiled project such as (java -jar girl-0.0.1-SNAPSHOT.jar)

Development:
this list Close deployment project, the project will stop, so we can use nohup technology project realization Close the project running in the background such as (nohup java -jar girl-0.0.1- SNAPSHOT.jar &) is not very simple, the deployment of the project will be used on Linux

Published 36 original articles · won praise 0 · Views 934

Guess you like

Origin blog.csdn.net/ityw520/article/details/104308669