Skip to content

Commit ef8706f

Browse files
committed
2016-03-20补充静态资源设置
1 parent 9b7dc41 commit ef8706f

15 files changed

Lines changed: 486 additions & 15 deletions

File tree

src/main/resources/spring/spring-mvc.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,17 @@
1717
<!-- 配置注解驱动 -->
1818
<mvc:annotation-driven/>
1919

20+
<!--静态资源映射-->
21+
<!--
22+
http://perfy315.iteye.com/blog/2008763
23+
mapping="/js/**"
24+
表示当浏览器有静态资源请求的时候,并且请求url路径中带有:/js/,则这个资源跑到webapp目录下的/WEB-INF/statics/js/去找
25+
比如我们在 JSP 中引入一个 js 文件:src="${webRoot}/js/jQuery-core/jquery-1.6.1.min.js
26+
-->
27+
<mvc:resources mapping="/css/**" location="/WEB-INF/statics/css/"/>
28+
<mvc:resources mapping="/js/**" location="/WEB-INF/statics/js/"/>
29+
<mvc:resources mapping="/images/**" location="/WEB-INF/statics/images/"/>
30+
2031

2132
<!-- 对模型视图名称的解析,即在模型视图名称添加前后缀(如果最后一个还是表示文件夹,则最后的斜杠不要漏了) 使用JSP-->
2233
<!-- 默认的视图解析器 在上边的解析错误时使用 (默认使用html)- -->

src/main/webapp/WEB-INF/statics/css/占位符.txt

Whitespace-only changes.
8.91 KB
Loading

src/main/webapp/WEB-INF/statics/js/jQuery-core/jquery-1.10.2.min.js

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/webapp/WEB-INF/statics/js/jQuery-core/jquery-1.4.4.min.js

Lines changed: 167 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/webapp/WEB-INF/statics/js/jQuery-core/jquery-1.6.1.min.js

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/webapp/WEB-INF/statics/js/jQuery-core/jquery-1.6.4.min.js

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/webapp/WEB-INF/statics/js/jQuery-core/jquery-1.8.3.min.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/webapp/WEB-INF/statics/js/jQuery-core/jquery-1.9.1.min.js

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/webapp/WEB-INF/statics/js/jQuery-core/jquery-2.0.3.min.js

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)