错误:org.springframework.beans.factory.BeanDefinitionStoreException:


在练习尚硅谷雷丰阳老师的SSM-CRUD整合的时候,因为使用的Thymeleaf,而不是jsp,跟着老师操作所有会出现一些错误,现在我把这些错误都整理一下,希望能帮助到有用的朋友。

org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext resource [/WEB-INF/DispatcherServlet-servlet.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/DispatcherServlet-servlet.xml]
错误:[/WEB-INF/DispatcherServlet-servlet.xml]

因为使用的是Thymeleaf解析器而不是JSP+ JSTL, 我出现这个错误的时候是因为jsp 换成了thymeleaf 但是把 index.html放在了 WEB-INF目录下 而不是放在了thymeleaf指定的文件目录下 所有thymeleaf视图解析器,所以解析不到。

把位置放对就OK了。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM