SpringBoot引入静态资源时出现的错误
解决方法
一、引入使用thymeleaf模板引擎
<!--支持跳转,springboot推荐使用thymeleaf模板引擎-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
二、在resource目录下创建templates目录
三、在springBoot配置文件yml中添加相应配置
spring:
thymeleaf:
prefix: classpath:/templates/