springboot访问html文件出现404错误
用springboot访问html文件时一直出现下面的错误:
controller层如下:
在application.properties中的配置如下:
以上配置的情况下,访问html页面一直出现404,后来发现需要导入thymleaf依赖,导入之后再次访问就可以成功运行
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>