javax.servlet.ServletException: Circular view path [index]: would dispatch back to the current handler URL [/index] again. Check your ViewResolver setup! (Hint: This may be the result of an unspecified view, due to default view name generation.)
问题原因
未引入Thymeleaf模板依赖,
解决方案
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
`
但我在加入依赖后仍无法引入Thymeleaf包,发现libraries仍未引入包,reimport 无效,后指定thymeleaf版本成功引入
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputeEncoding>UTF-8</project.reporting.outputeEncoding>
<java.version>1.8</java.version>
<thymeleaf.version>3.0.2.RELEASE</thymeleaf.version>
<thyeleaf-layout-dialect.version>2.1.1</thyeleaf-layout-dialect.version>
</properties>