码迷,mamicode.com
首页 > 编程语言 > 详细

springmvc-servlet.xml配置文件

时间:2017-10-17 21:40:40      阅读:155      评论:0      收藏:0      [点我收藏+]

标签:本地   xmlns   目录   www.   utf-8   component   framework   resource   intern   

<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.1.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
">
<!--静态资源文件的引用 -->
<mvc:annotation-driven></mvc:annotation-driven>
<!--采用<mvc:resources/>标签即可解决静态资源的访问问题 -->
<!--为了方便配置管理,最好把静态资源文件(js,css, image)统一放置在一个目录下 -->
<!--mapping:将静态资源映射到指定的路径下 -->
<!--location:本地静态资源文件所在的目录 -->
<mvc:resources location="/" mapping="/**"/>
<context:component-scan base-package="*"></context:component-scan>
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/"></property>
<property name="suffix" value=".jsp"></property>
</bean>

</beans>

springmvc-servlet.xml配置文件

标签:本地   xmlns   目录   www.   utf-8   component   framework   resource   intern   

原文地址:http://www.cnblogs.com/liangguangqiong/p/7683781.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!