SSM整合时IDE: File is included in 4 contexts


 

 

问题所在:
在spring-dao.xml,spring-service.xml,spring-web.xml没有放在同一个上下文中时

 

 

spring-service.xml中dataSource引入失败(dataSource在spring-dao.xml中已经配置完成)

 

 

当spring-dao.xml,spring-service.xml,spring-web.xml放在同一个上下文中时

 

 

spring-service.xml中dataSource引入成功

 

 

所谓File is included in 4 contexts是因为spring的配置文件放在了多个上下文中,只需找到以上位置,然后保留一个spring的上下文就OK了。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM