Several ways to build a project for the first spring boot app to start running

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.