异常信息:
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.)
解决方案:
在pom.xml中添加:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>

本文解决了一个关于Spring Boot应用中的循环视图路径错误,该错误发生在试图重新分发到当前处理器URL时。通过引入Thymeleaf依赖,可以避免由于默认视图名称生成导致的循环引用问题。
7870





