有可能是thymeleaf依赖导入异常,或者没导入thymeleaf依赖
可以尝试到pom.xml中导入thymeleaf依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
如果改完发现还是报500错误,可以去application.properties文件中将thymeleaf的缓存关闭
spring.thymeleaf.cache=false