博客园主题又更新啦~,细节等你发现!

错误: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了。

posted @   不开心的程序员  阅读(1736)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 三行代码完成国际化适配,妙~啊~
· .NET Core 中如何实现缓存的预热?
点击右上角即可分享
微信分享提示