Method one.
Configuring Run/debug Configuration
Select Main class for Project application startup class (Portal Main method)
(2). Proceed to the project directory, that is, the directory containing the Pom.xml, start the command line, enter MVN spring-boot:run, carriage return.
If a previous error occurs, add the following configuration in Pom.xml.
<repositories> <Repository> <ID>Spring-releases</ID> <URL>Https://repo.spring.io/libs-release</URL> </Repository></repositories><pluginrepositories> <pluginrepository> <ID>Spring-releases</ID> <URL>Https://repo.spring.io/libs-release</URL> </pluginrepository></pluginrepositories>
is as follows
After adding MVN spring-boot:run in console input
is started successfully.
(3) Project package and start up
After you create a new spring boot project, the project directory is as follows:
After the project directory console enters the MVN install command to run, the Targe directory is generated, and the target directory is the app jar package configured in Pom.xml
In the console input >java-jar Springboottest-0.0.1-snapshot.jar,
Several ways to build a project for the first spring boot app to start running