Circular view path [test]: Would dispatch and Cannot resolve MVC View XXX error

The premise has used the template engine Thymeleaf
Cannot resolve MVC View XXX appears, usually there is a wavy line under "xxx" at return
The console prints Circular view path [test]: would dispatch back to the current handler URL [/hello] again. etc.
The reason for the error, when importing the pom dependency
<dependency>
	<groupId>org.thymeleaf</groupId>
	<artifactId>thymeleaf</artifactId>
</dependency>
The correct import should be
<dependency>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>

Guess you like

Origin blog.csdn.net/weixin_45845039/article/details/114777244