SpringBoot访问页面报404

springBoot启动完之后,直接访问html文件,报404,

网上找了半天,发现需要在配置文件中加上这一句(这是在application.properties文件中这样写)

#指定静态资源路径
spring.resources.static-locations=classpath:/

posted @ 2021-04-01 16:44  快乐的死肥宅  阅读(1610)  评论(0)    收藏  举报