spring boot 整合js css 静态文件

一,添加配置javascript

spring:
  application:
    name: interview-server
  resources:
    static-locations: file:config/statics   //这里修改成指定的路径,它的默认路径为:classpath:[/META-INF/resources/, /resources/, /static/, /public/] plus context:/ 

 

二,在网页中添加引用java

 

<script type="text/javascript" src="/js/login.js"></script>

 

 

三,目录结构spring

 

 


学习交流群:677464431,更多文章:http://www.coc88.comapp

相关文章
相关标签/搜索