一,添加配置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