Circular view path [index]: would dispatch back to the current handler URL [/index] again. Check your ViewResolver setup!
访问templates下的资源报错,SpringBoot默认静态资源映射文件夹是 /static/ 或 /public/ 或 /resources/ 或 /META-INF/resources/,并没有 templates目录,但可以通过整合thymeleaf访问其资源。
为啥会出现上面无法访问的问题呢?原因是:
这个配置的作用是:不启用thymeleaf作为试图解析器。太粗心了……
删除或者改为true即可解决问题!