springboot配置多個yml文件


新接觸了springboot項目,yml一大堆,啟動不知道用的哪個,各種百度后:

<profiles>
<profile>
<id>dev</id>
<activation>
<!--默認激活-->
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<spring.profiles.active>dev</spring.profiles.active>
</properties>
</profile>
<profile>
<id>prod</id>
<properties>
<spring.profiles.active>prod</spring.profiles.active>
</properties>
</profile>
</profiles>
---------------------
原文:https://blog.csdn.net/m0_37054738/article/details/81388925


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM