application.properties
application-dev.properties
application-pro.properties
application-test.properties
spring.profiles.active=@profileActive@
@profileActive@未起作用
---------
解决方案:
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<profiles>
<profile>${profileActive}</profile>
</profiles>
<classifier>exec</classifier>
<mainClass>com.jd.sep.dc.SepDcApplication</mainClass>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>