Admin - SpringBoot + Maven 多啟動環(huán)境配置實(shí)例詳解
一:父級pom.xml文件 resources目錄下新建指定文件夾,存放Spring配置文件
<profiles> <profile> <id>dev</id> <properties> <profiles.active>dev</profiles.active> </properties> <activation> <activeByDefault>true</activeByDefault> </activation> </profile> <profile> <id>telework</id> <properties> <profiles.active>telework</profiles.active> </properties> </profile> <profile> <id>sit</id> <properties> <profiles.active>sit</profiles.active> </properties> </profile> <profile> <id>pre</id> <properties> <profiles.active>pre</profiles.active> </properties> </profile> <profile> <id>prod</id> <properties> <profiles.active>prod</profiles.active> </properties> </profile></profiles>
二:application.properties
######################### server ###################server.servlet.context-path=/i-admin-apiserver.port=10086spring.profiles.active=@profiles.active@
到此這篇關(guān)于Admin - SpringBoot + Maven 多啟動環(huán)境配置實(shí)例詳解的文章就介紹到這了,更多相關(guān)SpringBoot + Maven 環(huán)境配置內(nèi)容請搜索好吧啦網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持好吧啦網(wǎng)!
相關(guān)文章:
1. Android table布局開發(fā)實(shí)現(xiàn)簡單計(jì)算器2. 理解PHP5中static和const關(guān)鍵字3. jQuery 實(shí)現(xiàn)DOM元素拖拽交換位置的實(shí)例代碼4. php模擬實(shí)現(xiàn)斗地主發(fā)牌5. IntelliJ IDEA安裝插件的方法步驟6. phpstorm恢復(fù)默認(rèn)設(shè)置的方法步驟7. Vue封裝一個TodoList的案例與瀏覽器本地緩存的應(yīng)用實(shí)現(xiàn)8. Python random庫使用方法及異常處理方案9. Vuex localStorage的具體使用10. .Net Core使用Coravel實(shí)現(xiàn)任務(wù)調(diào)度的完整步驟

網(wǎng)公網(wǎng)安備