org.springframework.beans.factory.BeanDefinitionStoreException: Could not resolve bean definition resource pattern [classpath:spring/spring-*.xml]; nested exception is java.io.FileNotFoundException: class path resource [spring/] cannot be resolved to URL because it does not exist
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:229)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:188)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:129)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:452)
at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:664)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:630)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:678)
at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:549)
at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:490)
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1269)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1182)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:853)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:134)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:958)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:452)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1087)
at org.apache.coyote.AbstractProtocolAbstractConnectionHandler.process(AbstractProtocol.java:637)atorg.apache.tomcat.util.net.JIoEndpointAbstractConnectionHandler.process(AbstractProtocol.java:637)
at org.apache.tomcat.util.net.JIoEndpointAbstractConnectionHandler.process(AbstractProtocol.java:637)atorg.apache.tomcat.util.net.JIoEndpointSocketProcessor.run(JIoEndpoint.java:318)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutorWorker.run(ThreadPoolExecutor.java:617)atorg.apache.tomcat.util.threads.TaskThreadWorker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThreadWorker.run(ThreadPoolExecutor.java:617)atorg.apache.tomcat.util.threads.TaskThreadWrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
**
**: java.io.FileNotFoundException: class path resource [spring/] cannot be resolved to URL because it does not exist
at org.springframework.core.io.ClassPathResource.getURL(ClassPathResource.java:187)
at org.springframework.core.io.support.PathMatchingResourcePatternResolver.findPathMatchingResources(PathMatchingResourcePatternResolver.java:413)
at org.springframework.core.io.support.PathMatchingResourcePatternResolver.getResources(PathMatchingResourcePatternResolver.java:287)
at org.springframework.context.support.AbstractApplicationContext.getResources(AbstractApplicationContext.java:1159)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:216)
… 30 more
**
**
大师救我,这几个贴图都是只能访问index.jsp这是我第二次在网上问别人,第一次是刚刚在群里问各位同学,我不是一有问题就想着别人帮我解决,我已经调试了3天了,从来没有过一个问题搞这么久的,真的是没什么比较可行的办法了,可以说网上和课程还有别的课程上和我的问题相似的解决办法我大部分都试过,看了老师的一些解决办法大部分都是说配置文件错了,可是到最后我急的已经是直接拷贝老师您的配置文件了,可是还是这样!配置文件是没有错的,因为在我改错的过程中发现idea是可以正常运行并成功访问http://127.0.0.1:8080/o2o/superadmin/listarea!然后从一开始的rg.springframework.web.servlet.DispatcherServlet这个错误,我试过网上的项目右击–>properties–>Deployment Assembly–>add–>Java Build Path Entries–> 加入maven dependencies 不行,最后是用dependency:copy-dependencies把下下来的jar包拷贝到WEB-INF/lib下就可以了,然后Could not resolve bean definition resource pattern [classpath:spring/spring-.xml]这个错误 因为把classpath:spring/spring-.xml加一个 * 导致找不到访问的URL,所以还试过了吧spring资源文件直接放在src/main/resources下,pom.xml里面加配置, 改 * .calsspath 文件里面的配置,根据网上说的还有自己的理解改 JDK版本 tomcat版本 maven版本 maven仓库配置 还有删除本地仓库的jar包让他重新下载之类的 。还写过一个最简单的springmvc访问都不行 还试过一些其他的解决办法 实在是不行 虽然用idea运行项目是可以的 但是我和我最后的倔强不允许我用eclipse创业未半,而中道改用idea这个方案。弱弱的说一句我知道视频教程的老师本身也有工作比较忙,还要回答同学问题可能忙不过来,但是真的是没办法了,真的是不好意思,所有看过的课程我是第一次问老师问题,从来都没有麻烦老师的!因为配置应该是没有问题的,所以能不能在老师您空一点跑一下存在百度云链接里的这个和您学的只做了一点点的项目,帮忙看一下是哪里错了
链接:https://pan.baidu.com/s/1MpjZmiJH8snrlnx8cfaQew
提取码(百度云说不要提取码的功能在维护只能更麻烦老师了):mpxm
我有点啰嗦,不好意思,当然老师您有空再说,实在不行我还是用idea继续做了!谢谢老师
SSM商铺V1.0,解决毕设痛点;SpringBoot商铺V2.0,满足工作刚需
了解课程