Why use static resources
In the team development process, team members have their own division. In the process of writing code to try to avoid conflicts, to try to separate the various types of code. Therefore, in view files, pulled out as far as possible javascript
, css
the code to an external file, and then follow 静态资源
referenced (for Minato more nonsense words, can be ignored).
Configuring static resource path
Modify the srcmainresourcesspringapplicationContext-mvc.xml
file, add a static resource reference path:
1 |
|
References static resources
After you configure a static resource Road King, can be jsp
, html
and other resources referenced in page view.
To echarts
the library, for example, the downloaded echarts.min.js
file in srcmainwebappWEB-INFresourcesjavascript
the directory, edit view file reference echarts
:
1 |
<%@page contentType="text/html" pageEncoding="UTF-8"%> |