springMVC对静态资源的访问-配置
2016-08-19 16:52
330 查看
<!--对静态资源的访问 方案一(二选一) -->
<mvc:default-servlet-handler/>
<!--对静态资源的访问 方案二(二选一) -->
<mvc:resources location="/" mapping="*.html"/>
<mvc:resources location="/css" mapping="*.css"/>
<mvc:resources location="/js" mapping="*.js"/>
<mvc:resources location="/img" mapping="*.jpg"/>
-----------------------------------------------------
加<mvc:resources...前,要加上<mvc:annotation-driver/>,否则servlet控件器会解析失败
<mvc:default-servlet-handler/>
<!--对静态资源的访问 方案二(二选一) -->
<mvc:resources location="/" mapping="*.html"/>
<mvc:resources location="/css" mapping="*.css"/>
<mvc:resources location="/js" mapping="*.js"/>
<mvc:resources location="/img" mapping="*.jpg"/>
-----------------------------------------------------
加<mvc:resources...前,要加上<mvc:annotation-driver/>,否则servlet控件器会解析失败
相关文章推荐
- springMVC处理静态资源——jquery文件配置正确访问不到404错误信息
- 在springmvc中配置静态资源访问路径的时候,js出现无效原因
- springmvc访问静态资源的springmvc.xml配置
- SpringMVC 笔记——访问静态资源DispatcherServlet 配置问题
- SpringMVC REST 风格静态资源访问配置
- SpringMVC在web.xml中配置DispatcherServlet拦截了静态资源访问
- SpringMVC 配置静态资源的正常访问
- SpringMVC 多控制器,静态资源访问,配置文件位置更改
- springMVC配置静态资源访问的<mvc:resources>标签的使用
- springMvc配置静态资源访问
- 当配置 DispatcherServlet拦截“/”,SpringMVC访问静态资源的三种方式
- SpringMVC对静态资源文件的访问(配置)
- 如何配置SpringMVC能够访问静态资源
- SpringMVC配置静态资源访问
- SpringMVC(10):配置静态资源访问(前端页面的元素显示)及实例
- SpringMVC对静态资源文件的访问(配置)
- springmvc访问静态资源的springmvc.xml配置
- SpringMVC对静态资源文件的访问(配置)
- SpringMVC REST 风格静态资源访问配置
- SpringMvc 框架静态资源访问配置