首页 > 其他 > 详细

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

时间:2020-05-30 10:01:57      阅读:83      评论:0      收藏:0      [点我收藏+]

技术分享图片

 

 

问题所在:
在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了。

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

原文:https://www.cnblogs.com/mjn1/p/12990762.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!