springboot页面资源,静态资源读取

来源:互联网 发布:杭州莱茵矩阵国际 编辑:程序博客网 时间:2024/06/06 00:49

springboot页面资源 默认是从templates目录下读取

application.properties中

## 响应页面默认后缀spring.mvc.view.suffix=.htmlspring.mvc.view.prefix=/templates/

springboot静态资源 默认是从 static目录下读取的


故这里引入静态资源这么写即可,直接写static/下的路径

<head>    <title>Hello World!</title>    <script type="text/javascript" src="/jquery-1.8.3.min.js"></script></head>


原创粉丝点击