在application.properties方文件中添加如下代码:(把static改成自己允许访问的文件夹名字即可)
#设置允许访问静态static目录
spring.mvc.static-path-pattern=/static/**
springg.resources.static-location=classpath:/static/
在application.properties方文件中添加如下代码:(把static改成自己允许访问的文件夹名字即可)
#设置允许访问静态static目录
spring.mvc.static-path-pattern=/static/**
springg.resources.static-location=classpath:/static/