123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- <?xml version="1.0" encoding="UTF-8"?>
- <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="http://www.springframework.org/schema/beans" xmlns:aop="http://www.springframework.org/schema/aop"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
- http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-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/aop http://www.springframework.org/schema/aop/spring-aop.xsd"
- default-lazy-init="true">
- <context:property-placeholder location="classpath*:/system.properties" ignore-resource-not-found="true"
- ignore-unresolvable="true"/>
- <context:component-scan base-package="com.hboxs" use-default-filters="false">
- <context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
- </context:component-scan>
- <!-- aop -->
- <aop:aspectj-autoproxy/>
- <mvc:annotation-driven validator="validator" content-negotiation-manager="contentNegotiationManager"/>
- <bean id="contentNegotiationManager" class="org.springframework.web.accept.ContentNegotiationManagerFactoryBean">
- <property name="favorPathExtension" value="false"/>
- <property name="favorParameter" value="false"/>
- <property name="ignoreAcceptHeader" value="false"/>
- <property name="mediaTypes">
- <value>
- atom=application/atom+xml
- html=text/html
- json=application/json
- *=*/*
- </value>
- </property>
- </bean>
- <mvc:interceptors>
- <mvc:interceptor>
- <mvc:mapping path="/**"/>
- <bean id="openSessionInViewInterceptor"
- class="org.springframework.orm.jpa.support.OpenEntityManagerInViewInterceptor">
- <property name="entityManagerFactory" ref="entityManagerFactory"/>
- </bean>
- </mvc:interceptor>
- <mvc:interceptor>
- <mvc:mapping path="/asl-admin/**"/>
- <bean id="webContentInterceptor" class="org.springframework.web.servlet.mvc.WebContentInterceptor">
- <property name="cacheSeconds" value="0"/>
- </bean>
- </mvc:interceptor>
- <mvc:interceptor>
- <mvc:mapping path="/asl-admin/**"/>
- <bean id="listInterceptor" class="com.hboxs.common.interceptor.ListInterceptor"/>
- </mvc:interceptor>
- </mvc:interceptors>
- <bean id="validator" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean">
- <property name="validationMessageSource" ref="messageSource"/>
- </bean>
- <bean id="viewResolver" class="org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver">
- <property name="viewClass" value="org.springframework.web.servlet.view.freemarker.FreeMarkerView"/>
- <property name="suffix" value="${template.suffix}"/>
- <property name="contentType" value="text/html; charset=UTF-8"/>
- <property name="exposeRequestAttributes" value="true"/>
- <property name="exposeSessionAttributes" value="true"/>
- <property name="exposeSpringMacroHelpers" value="true"/>
- <property name="requestContextAttribute" value="request"/>
- <property name="cache" value="true"/>
- <property name="order" value="0"/>
- </bean>
- <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
- <property name="defaultEncoding" value="utf-8"/>
- </bean>
- <bean id="exceptionResolver" class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver">
- <property name="defaultErrorView" value="asl/common/error"/>
- </bean>
- </beans>
|