在一個 Maven 多模塊專案中,我有一個像下面這樣的配置..
<profiles>
<profile>
<id>debug</id>
<activation>
<property>
<name>debug</name>
<value>true</value>
</property>
</activation>
<properties>
<spring.profiles.active>dev</spring.profiles.active>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<jvmArguments>-Dapp.basedir=${project.build.directory} -Xmx256M
-XX: UseG1GC -Xdebug
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8003</jvmArguments>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
當我使用命令列啟動應用程式時:
mvn spring-boot:run -Dspring-boot.run.profiles=debug
終端linux堆疊說:
c.a.epr.core.SpringApplication : The following profiles are active: debug
但應用程式的行為就像 NO PROFILE 行為。我的配置有什么問題?
uj5u.com熱心網友回復:
也許你應該使用
mvn spring-boot:run -Pdebug
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/504079.html
標籤:行家 轮廓 spring-boot-maven 插件
