您的位置:首页 > 编程语言 > Java开发

springmvc头部配置文件

2016-01-23 19:35 381 查看
<?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:context="http://www.springframework.org/schema/context"

    xsi:schemaLocation=

       "http://www.springframework.org/schema/beans

        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/context
        http://www.springframework.org/schema/context/spring-context.xsd">
    <!-- 启用spring mvc 注解 -->

    <context:annotation-config />

    <!-- 配置注解的扫描范围 -->

    <context:component-scan base-package="com.zyf.mvc"></context:component-scan>

    <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">

    <!-- 配置前缀 -->

    <property name="prefix" value="/WEB-INF"></property>

    <!-- 配置后缀 -->

    <property name="suffix" value=".jsp"></property>

    </bean>   

</beans>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: