Skip to content

Instantly share code, notes, and snippets.

@wendelicious
Created June 5, 2013 06:07
Show Gist options
  • Save wendelicious/5711920 to your computer and use it in GitHub Desktop.
Save wendelicious/5711920 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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.0.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
">
<!--<bean id="metricsAspect" class="com.infusionsoft.metrics.aspect.MetricsAwareAspect" />-->
<!--<aop:aspectj-autoproxy proxy-target-class="true">-->
<!--<aop:include name="metricsAspect" />-->
<!--</aop:aspectj-autoproxy>-->
<context:component-scan base-package="com.infusionsoft" use-default-filters="false">
<context:include-filter type="regex" expression="com\.infusionsoft.*controller.*"/>
<context:exclude-filter type="regex" expression="com\.infusionsoft.*controller.*\$[0-9]+" />
</context:component-scan>
<!-- View naming conventions -->
<bean id="viewNameTranslator" class="org.springframework.web.servlet.view.DefaultRequestToViewNameTranslator"/>
<!-- Disable caching post processor -->
<bean id="disableCachingPostProcessor" class="com.infusionsoft.multitenant.spring.DisableCachingPostProcessor"/>
<!-- Controller and action naming conventions -->
<bean class="org.springframework.web.servlet.mvc.support.ControllerClassNameHandlerMapping">
<property name="caseSensitive" value="true"/>
<property name="interceptors">
<list>
<ref bean="baseInterceptor"/>
<ref bean="localeChangeInterceptor"/>
<ref bean="clientSideValidationInterceptor"/>
</list>
</property>
<property name="order" value="1"/>
</bean>
<bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping">
<property name="order" value="2"/>
</bean>
<bean id="baseInterceptor" class="com.infusionsoft.rendering.BaseControllerInterceptor"/>
<bean id="clientSideValidationInterceptor" class="com.infusionsoft.validation.ClientSideValidationInterceptor"/>
<bean id="localeChangeInterceptor" class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor">
<property name="paramName" value="siteLanguage"/>
</bean>
<bean id="localeResolver" class="org.springframework.web.servlet.i18n.AcceptHeaderLocaleResolver"/>
<!-- Resolver for JSP views -->
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
<property name="prefix" value="/WEB-INF/jsp/"/>
<property name="suffix" value=".jsp"/>
</bean>
<bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
<property name="favorPathExtension" value="true"/>
<property name="mediaTypes">
<map>
<entry key="json" value="application/json"/>
<entry key="jsonp" value="application/javascript"/>
</map>
</property>
<property name="defaultViews">
<list>
<bean class="org.springframework.web.servlet.view.json.MappingJacksonJsonView">
<property name="contentType" value="application/json"/>
<property name="objectMapper" ref="infusionsoftObjectMapper"/>
<!--<property name="renderedAttributes">-->
<!--<set>-->
<!--<value>items</value>-->
<!--</set>-->
<!--</property>-->
</bean>
<bean class="com.infusionsoft.mvc.spring.view.jsonp.MappingJacksonJsonpView"/>
</list>
</property>
</bean>
<bean id="webBindingInitializer" class="org.springframework.web.bind.support.ConfigurableWebBindingInitializer">
<property name="conversionService" ref="conversionService"/>
<property name="validator" ref="validator"/>
</bean>
<bean id="infusionAnnotationMethodHandlerAdaptor" class="com.infusionsoft.mvc.spring.InfusionAnnotationMethodHandlerAdaptor">
<property name="webBindingInitializer" ref="webBindingInitializer" />
</bean>
<bean id="springMvcSecurityInterceptor"
class="com.infusionsoft.security.authorization.SecurityMethodInterceptor">
<property name="methodFilter">
<bean class="com.infusionsoft.util.AnnotationMethodFilter">
<property name="annotation" value="org.springframework.web.bind.annotation.RequestMapping"/>
</bean>
</property>
<property name="accessDecisionManager" ref="accessDecisionManager"/>
</bean>
<bean id="threadSafetyMethodInterceptor" class="com.infusionsoft.mvc.spring.ThreadSafetyMethodInterceptor" />
<bean id="controllerSecurityProxy" class="com.infusionsoft.util.spring.aop.AnnotationAutoProxyCreator"
lazy-init="false">
<property name="annotation" value="org.springframework.stereotype.Controller"/>
<property name="interceptorNames">
<list>
<value>springMvcSecurityInterceptor</value>
<value>threadSafetyMethodInterceptor</value>
<!--<value>requestMappingMetricsPublishingMethodInterceptor</value>-->
</list>
</property>
</bean>
<bean id="metricsPublishingMethodInterceptor" class="com.infusionsoft.metrics.spring.StereotypedMetricsPublishingMethodInterceptor" />
<!--<bean id="defaultMetricsPublishingProxy" class="com.infusionsoft.metrics.aspect.MetricsAnnotatedAutoProxyCreator"-->
<!--lazy-init="false">-->
<!--<property name="interceptorNames">-->
<!--<list>-->
<!--<value>metricsPublishingMethodInterceptor</value>-->
<!--</list>-->
<!--</property>-->
<!--</bean>-->
<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"/>
</beans>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment