在 SpringBoot 的配置文件中引入配置文件的方式

application-context.xml文件默認使用的配置爲 application.properties當需要引入其他配置文件時,需要使用

<context:property-placeholder location="classpath:bootstrap.yml"/>

參考鏈接:
Spring Boot 加載XML配置
深入Spring Boot: 那些注入不了的 Spring 佔位符(${} 表達式)
springboot乾貨——(八)springboot引入外部xml配置文件
https://blog.csdn.net/VcStrong/article/details/81223627

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章