Configure active profile in SpringBoot via Maven

前端 未结 7 1580
执笔经年
执笔经年 2020-11-29 20:13

I\'m trying to set an active profile in Spring Boot application using Maven 3.
In my pom.xml I set default active profile and property spring.pr

7条回答
  •  暖寄归人
    2020-11-29 21:08

    I would like to run an automation test in different environments.
    So I add this to command maven command:

    spring-boot:run -Drun.jvmArguments="-Dspring.profiles.active=productionEnv1"
    

    Here is the link where I found the solution: [1]https://github.com/spring-projects/spring-boot/issues/1095

提交回复
热议问题