spring——applicationContextXML文件模板


<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"
	xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:aop="http://www.springframework.org/schema/aop"
	xmlns:task="http://www.springframework.org/schema/task"
	xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.2.xsd
		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.2.xsd
		http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.2.xsd
	 	http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.2.xsd">

	
	<context:component-scan base-package="com.qzh.controller">
	<context:include-filter type="annotation"
		expression="org.springframework.stereotype.Controller" />
	context:component-scan>

	
	<mvc:annotation-driven>mvc:annotation-driven>
	
	
	<task:annotation-driven/>
	
	
	<mvc:default-servlet-handler/>
	
	
	<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
		<property name="prefix" value="/WEB-INF/views/">property>
		<property name="suffix" value=".jsp">property>
	bean>
	
	
	<bean id="multipartResolver" 
		class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
		
		<property name="maxUploadSize">  
            <value>10485760value>  
        property>  
        
        <property name="defaultEncoding">
            <value>UTF-8value>
        property>
	bean>
	
	
	













beans>

你可能感兴趣的:(Java工具模板,spring)