在 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

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