springboot--Whitelabel Error Page

两种方案
1.application.properties中增加该配置
spring.resources.static-locations=classpath:/templates/,classpath:/static
虽然默认是去templates下找,
最好明确指明先去tempplates文件夹下匹配html,然后再去statics下
2.把启动类放在最外层
SpringBoot默认会扫描启动类所在的包及其子包。
启动类是注解@SpringBootApplication标注的类,也就是要确定@Controller能被扫描到

原文地址:https://www.cnblogs.com/itjone/p/14985634.html