今天搭建SpringMvc的时候突然报:
org.springframework.beans.factory.BeanDefinitionStoreException: Could not resolve bean definition resource pattern [spring/ApplicationContext-*.xml]; nested exception is java.io.FileNotFoundException: ServletContext resource [/spring/] cannot be resolved to URL because it does not exist
经过自习检查路径配置文件名字什么都没有写错.最后发现是在web.xml中配置的时候少写了classpath:切记
本文记录了一次在搭建SpringMVC过程中遇到的配置错误:在web.xml中未正确指定资源路径,导致无法加载ApplicationContext配置文件。作者通过仔细检查并添加正确的类路径前缀解决了该问题。
1408

被折叠的 条评论
为什么被折叠?



