前提已经使用模板引擎Thymeleaf
出现Cannot resolve MVC View XXX,一般是在return处的"xxx"下有波浪线
控制台打印Circular view path [test]: would dispatch back to the current handler URL [/hello] again.等内容
错误原因,导入pom依赖时为
<dependency>
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf</artifactId>
</dependency>
正确导入应为
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>