Spring-boot Project Specifies a profile start in eclipse

Source: Internet
Author: User

As shown below, my project has three configuration files, if I start the project with APPLICATION-TEST.YML, the steps are as follows:



Mouse click Project Right button ——— >run as ———— >run configurations ———— >java Application


Right-click Java application ———— > click New as shown below:

Fill in the name you want to define by the arrow pointing to name (pick up)

Fill in the path of your startup class at the main class where the arrow points


Click arguments to configure the parameters '--spring.peofiles.active=test ' in program arguments:

Note: Specify to start the project with APPLICATION-TEST.YML, just specify the parameter--spring.peofiles.active=test





Related Article

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.