Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 727 Bytes

README.md

File metadata and controls

27 lines (19 loc) · 727 Bytes

#Active Spring profiles by below several methods

1.vm options -Dspring.profiles.active=dev

2.application.properties spring.profiles.active=dev

3.mvn spring-boot:run -Drun.jvmArguments="-Dspring.profiles.active=dev" or mvn spring-boot:run -Dspring.profiles.active=dev

  1. pom.xml config

<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<profiles>
<profile>dev</profile>
</profiles>
</configuration>
</plugin>
...
</plugins>

then mvn spring-boot:run