看看你的表现层是不是用的@RestController注解,@RestController是无法返回html文件,返回在网页上面的内容。 所以使用thymeleaf模版表现层要使用@Controller注解。