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了。

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