java.lang.IllegalStateException: Failed to load ApplicationContext


Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: 
Invalid bean definition with name 'com.alibaba.dubbo.config.RegistryConfig' defined in null:
Could not resolve placeholder 'address' in string value "${address}";
nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'address' in string value "${address}"

1....重復加載配置文件:一個配置文件多次引入導致系統加載判斷異常,產生報錯異常
錯誤引入文件:@ContextConfiguration(locations = {"classpath*:spring/applicationContext*.xml"})  
:我的配置文件引入了多次,* 號的引入包括全部配置文件;
正確引入文件:@ContextConfiguration(locations = {"classpath:spring/applicationContext-dao.xml"})

:我把配置文件引入減少到單個文件,加載配置文件時,可以完全解析並獲得 spring工廠創建的對象

以上完美解決問題!!!
 


免責聲明!

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



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