Created
March 14, 2011 22:35
-
-
Save tempredirect/870021 to your computer and use it in GitHub Desktop.
ever wondered what <mvc:mvc:annotation-driven/> actually generates
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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:p="http://www.springframework.org/schema/p" | |
xmlns:context="http://www.springframework.org/schema/context" | |
xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:util="http://www.springframework.org/schema/util" | |
xsi:schemaLocation="http://www.springframework.org/schema/beans | |
http://www.springframework.org/schema/beans/spring-beans-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/mvc | |
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd"> | |
<!-- | |
<mvc:annotation-driven /> | |
--> | |
<bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"/> | |
<bean id="conversionService" class="org.springframework.format.support.FormattingConversionServiceFactoryBean"/> | |
<!-- include if you have a validator framework present ( HibernateValidator 4+) --> | |
<!--<bean id="validator" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean"/>--> | |
<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"> | |
<property name="webBindingInitializer"> | |
<bean class="org.springframework.web.bind.support.ConfigurableWebBindingInitializer"> | |
<property name="conversionService" ref="conversionService"/> | |
<!--<property name="validator" ref="validator"/>--> | |
</bean> | |
</property> | |
<property name="messageConverters"> | |
<list> | |
<bean class="org.springframework.http.converter.ByteArrayHttpMessageConverter"/> | |
<bean class="org.springframework.http.converter.StringHttpMessageConverter"> | |
<property name="writeAcceptCharset" value="false"/> | |
</bean> | |
<bean class="org.springframework.http.converter.ResourceHttpMessageConverter"/> | |
<bean class="org.springframework.http.converter.xml.SourceHttpMessageConverter"/> | |
<bean class="org.springframework.http.converter.xml.XmlAwareFormHttpMessageConverter"/> | |
<bean class="org.springframework.http.converter.xml.Jaxb2RootElementHttpMessageConverter"/> | |
<bean class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter"/> | |
<!-- if you have rome present --> | |
<!--<bean class="org.springframework.http.converter.feed.AtomFeedHttpMessageConverter"/>--> | |
<!--<bean class="org.springframework.http.converter.feed.RssChannelHttpMessageConverter"/>--> | |
</list> | |
</property> | |
</bean> | |
<bean class="org.springframework.web.servlet.handler.MappedInterceptor"> | |
<constructor-arg index="0"><null/></constructor-arg> | |
<constructor-arg index="1" type="org.springframework.web.servlet.HandlerInterceptor"> | |
<bean class="org.springframework.web.servlet.handler.ConversionServiceExposingInterceptor"> | |
<constructor-arg index="0" ref="conversionService"/> | |
</bean> | |
</constructor-arg> | |
</bean> | |
</beans> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment