Intellij idea +Spring boot templeat 错误

提示找不到模板,使用Eclipse不会报这个错!不知道啥原因,每次报错的模板不一样,随机的!应该不是url错误图片说明

你配置模板引擎了吗,springboot 推荐使用Thymeleaf作为模板,对jsp的支持不好,在pom.xml中添加

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>

楼上说的很对,我之前也遇到过相同的bug,也是这样解决的,就是在pom.xml
中配置:

org.springframework.boot
spring-boot-starter-thymeleaf

再重新运行就ok了