SpringBoot项目根据Environment环境更改profiles配置
<p>SpringBoot项目根据Environment环境更改profiles配置:</p><pre><code>server:<br> port: 9000<br>---<br> <br>spring:<br> profiles: development<br>server:<br> port: 9001<br> <br>---<br> <br>spring:<br> profiles: production<br>server:<br> port: 0</code></pre><pre><code>spring.profiles.active=production</code></pre><pre><code>$ java -jar -Dspring.profiles.active=production demo-0.0.1-SNAPSHOT.jar</code></pre><p><br></p>
收藏(0)
分享
相关标签: