javax.servlet.ServletException: Could not resolve view with name 'xxx/xxx' in servlet with name 'dispatcherServlet'
今天在调试后台管理系统时遇到这个bug,上网搜了好久也没找到,结果我在application.properties中添加
spring.resources.static-locations=classpath:/templates/
就搞定了,原因是springboot默认static中放静态页面,
而templates中放动态页面,而我想直接访问templates中的文件,所以报错了,在配置中添加后,就能正常访问了。

浙公网安备 33010602011771号