Everyone's the hero in their own story.

顾久

好好地享受当下,闻闻花香,毕竟鲜花难得开放一次。

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中的文件,所以报错了,在配置中添加后,就能正常访问了。
posted @ 2020-08-10 20:26  顾久  阅读(1198)  评论(0)    收藏  举报