在进行maven+spring+struts+hibernate整合时发生class path resource [spring.xml] cannot be opened because it do

在进行maven+spring+struts+hibernate整合时发生class path resource [spring.xml] cannot be opened because it do及BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext找不到bean错误时,在web.XML中加入
        
            contextConfigLocation
            classpath*:spring.xml,classpath*:applicationContext*.xml

        

在classpath后面加*,因为classpath默认路径不是src下的resource文件

你可能感兴趣的:(在进行maven+spring+struts+hibernate整合时发生class path resource [spring.xml] cannot be opened because it do)