| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 | <?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" xmlns:mvc="http://www.springframework.org/schema/mvc"    xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd        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">	<context:property-placeholder		ignore-resource-not-found="true" location="classpath*:spring/application.properties" />		    <!-- 自动扫描且只扫描@Controller -->    <context:component-scan base-package="com.xt.jygl" use-default-filters="false">        <context:include-filter type="annotation" expression="org.springframework.stereotype.Controller" />    </context:component-scan>    	<bean id="SpringApplicationContext" class="com.xtframe.core.utils.ApplicationContextHelper"></bean>    <mvc:annotation-driven >    	<mvc:message-converters>    		<!-- 避免IE执行AJAX时,返回JSON出现下载文件 -->			<bean id="mappingJacksonHttpMessageConverter"				class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter">				<property name="supportedMediaTypes">					<list>						<value>text/html;charset=UTF-8</value>					</list>				</property>			</bean>    	</mvc:message-converters>    </mvc:annotation-driven>    <mvc:view-controller path="/" view-name="redirect:/main" />    <mvc:resources mapping="/favicon.ico" location="/favicon.ico" />    <mvc:resources mapping="/static/**" location="/static/" />    <mvc:default-servlet-handler />    <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">        <property name="prefix" value="/WEB-INF/pages/" />        <property name="suffix" value=".jsp" />    </bean>    <bean class="com.xt.jygl.common.ExceptionResolver">        <property name="bizLogRecorder" ref="bizLogRecorder" />        <property name="exceptionMappings">            <props>                <prop key="org.apache.shiro.authz.UnauthorizedException">error/403</prop>                <prop key="java.lang.Exception">error/500</prop>            </props>        </property>    </bean>	<!-- WebService -->	<bean class="org.springframework.remoting.jaxws.SimpleJaxWsServiceExporter">		<property name="baseAddress"				  value="http://${webService.url}:${webService.port}/" />	</bean>    <!-- AOP式方法级权限检查 -->    <bean class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator" depends-on="lifecycleBeanPostProcessor">        <property name="proxyTargetClass" value="true" />    </bean>    <mvc:interceptors>        <mvc:interceptor>            <mvc:mapping path="/**" />            <bean class="com.xtframe.web.support.LoggerInterceptor">                <property name="bizLogRecorder" ref="bizLogRecorder" />            </bean>        </mvc:interceptor>    </mvc:interceptors>    <!-- file upload -->	<bean id="multipartResolver"		class="org.springframework.web.multipart.commons.CommonsMultipartResolver">		<!-- set the max upload size100MB -->		<property name="maxUploadSize" value="20971520"></property>		<property name="maxInMemorySize" value="4096"></property>		<property name="defaultEncoding" value="UTF-8"></property>	</bean></beans>
 |