.properties文件加载失败
生活随笔
收集整理的這篇文章主要介紹了
.properties文件加载失败
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
Spring容器采用反射掃描的發現機制,在探測到Spring容器中有一個org.springframework.beans.factory.config.PropertyPlaceholderConfigurer的Bean就會停止對剩余PropertyPlaceholderConfigurer的掃描(Spring 3.1已經使用PropertySourcesPlaceholderConfigurer替代PropertyPlaceholderConfigurer了)。?
而這個基于命名空間的配置,其實內部就是創建一個PropertyPlaceholderConfigurer Bean而已。換句話說,即Spring容器僅允許最多定義一個PropertyPlaceholderConfigurer(或),其余的會被Spring忽略掉(其實Spring如果提供一個警告就好了)。
?
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"><property name="locations"><list><value>classpath:jdbc.properties</value><!--<value>classpath:redis.properties</value>--> </list></property> </bean>?
轉載地址:https://blog.csdn.net/sinat_36201917/article/details/54411373
總結
以上是生活随笔為你收集整理的.properties文件加载失败的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Python可视化模块——Matplot
- 下一篇: Oracle PL/SQL 源代码加密实