Spring Boot thymeleaf 引入js css 报错404 找不到文件问题

Spring Boot thymeleaf 引入js css 报错404 找不到文件问题

 

在application.properties中加入:

spring.mvc.static-path-pattern=/**

spring.resources.static-locations = classpath:/templates/

 

html中引入

 

 

jquery.js在当前目录(目录resources/templates/jquery.js , html也在当前目录)

你可能感兴趣的:(spring,boot)