springmvc笔记之 -- 配置文件

来源:互联网 发布:淘宝类目选错了 编辑:程序博客网 时间:2024/06/06 03:39
<?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:mvc="http://www.springframework.org/schema/mvc"xmlns:context="http://www.springframework.org/schema/context"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd "><!-- 自动扫描 --><context:component-scan base-package="cn.springmvc.web.controller"/><!-- 注解驱动 --><mvc:annotation-driven/><!-- 资源管理 --><mvc:resources location="/resources/" mapping="/resources/**"/><mvc:resources location="/upload/" mapping="/upload/**"/><!-- 上传文件解析器 --><bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"><property name="maxUploadSize" value="10485670"/> <!-- 10M --></bean><!-- 内部资源视图解析器  prefix + logicName + suffix /WEB-INF/jsps/ + index + .jsp--><bean id="internalResourceViewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"><!-- 前缀 --><property name="prefix" value="/WEB-INF/jsps/"/><!-- 后缀 --><property name="suffix" value=".jsp"/></bean></beans>

1 0