在练习尚硅谷雷丰阳老师的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了。