@@ -635,8 +635,8 @@ controller. When this is the case, for controllers specifically, we recommend
635
635
using class-based proxying. This is typically the default choice with controllers.
636
636
However if a controller must implement an interface that is not a Spring Context
637
637
callback (e.g. `InitializingBean`, `*Aware`, etc), you may need to explicitly
638
- configure class-based proxying. For example with `<tx:annotation-driven />`,
639
- change to `<tx:annotation-driven proxy-target-class="true" />`.
638
+ configure class-based proxying. For example with `<tx:annotation-driven/>`,
639
+ change to `<tx:annotation-driven proxy-target-class="true"/>`.
640
640
641
641
[[mvc-ann-requestmapping-31-vs-30]]
642
642
==== New Support Classes for @RequestMapping methods in Spring MVC 3.1
@@ -1368,8 +1368,8 @@ the MVC namespace or the MVC Java config see <<mvc-config-enable>> instead.
1368
1368
1369
1369
<bean id="marshallingHttpMessageConverter"
1370
1370
class="org.springframework.http.converter.xml.MarshallingHttpMessageConverter">
1371
- <property name="marshaller" ref="castorMarshaller" />
1372
- <property name="unmarshaller" ref="castorMarshaller" />
1371
+ <property name="marshaller" ref="castorMarshaller"/>
1372
+ <property name="unmarshaller" ref="castorMarshaller"/>
1373
1373
</bean>
1374
1374
1375
1375
<bean id="castorMarshaller" class="org.springframework.oxm.castor.CastorMarshaller"/>
@@ -1897,9 +1897,9 @@ PropertyEditors required by several of the PetClinic controllers.
1897
1897
[subs="verbatim,quotes"]
1898
1898
----
1899
1899
<bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter">
1900
- <property name="cacheSeconds" value="0" />
1900
+ <property name="cacheSeconds" value="0"/>
1901
1901
<property name="webBindingInitializer">
1902
- <bean class="org.springframework.samples.petclinic.web.ClinicBindingInitializer" />
1902
+ <bean class="org.springframework.samples.petclinic.web.ClinicBindingInitializer"/>
1903
1903
</property>
1904
1904
</bean>
1905
1905
----
@@ -4512,7 +4512,7 @@ context defined):
4512
4512
http://www.springframework.org/schema/mvc
4513
4513
http://www.springframework.org/schema/mvc/spring-mvc.xsd">
4514
4514
4515
- <mvc:annotation-driven />
4515
+ <mvc:annotation-driven/>
4516
4516
4517
4517
</beans>
4518
4518
----
@@ -4602,7 +4602,7 @@ and override the methods you need:
4602
4602
}
4603
4603
----
4604
4604
4605
- To customize the default configuration of `<mvc:annotation-driven />` check what
4605
+ To customize the default configuration of `<mvc:annotation-driven/>` check what
4606
4606
attributes and sub-elements it supports. You can view the
4607
4607
http://schema.spring.io/mvc/spring-mvc.xsd[Spring MVC XML schema] or use the code
4608
4608
completion feature of your IDE to discover what attributes and sub-elements are
@@ -4799,15 +4799,15 @@ And in XML use the `<mvc:interceptors>` element:
4799
4799
[subs="verbatim"]
4800
4800
----
4801
4801
<mvc:interceptors>
4802
- <bean class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor" />
4802
+ <bean class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor"/>
4803
4803
<mvc:interceptor>
4804
4804
<mvc:mapping path="/**"/>
4805
4805
<mvc:exclude-mapping path="/admin/**"/>
4806
- <bean class="org.springframework.web.servlet.theme.ThemeChangeInterceptor" />
4806
+ <bean class="org.springframework.web.servlet.theme.ThemeChangeInterceptor"/>
4807
4807
</mvc:interceptor>
4808
4808
<mvc:interceptor>
4809
4809
<mvc:mapping path="/secure/*"/>
4810
- <bean class="org.example.SecurityInterceptor" />
4810
+ <bean class="org.example.SecurityInterceptor"/>
4811
4811
</mvc:interceptor>
4812
4812
</mvc:interceptors>
4813
4813
----
@@ -4858,7 +4858,7 @@ that in turn can be created with a `ContentNegotiationManagerFactoryBean`:
4858
4858
[source,xml,indent=0]
4859
4859
[subs="verbatim,quotes"]
4860
4860
----
4861
- <mvc:annotation-driven content-negotiation-manager="contentNegotiationManager" />
4861
+ <mvc:annotation-driven content-negotiation-manager="contentNegotiationManager"/>
4862
4862
4863
4863
<bean id="contentNegotiationManager" class="org.springframework.web.accept.ContentNegotiationManagerFactoryBean">
4864
4864
<property name="favorPathExtension" value="false"/>
@@ -4954,10 +4954,10 @@ And the same in XML:
4954
4954
<mvc:view-resolvers>
4955
4955
<mvc:content-negotiation>
4956
4956
<mvc:default-views>
4957
- <bean class="org.springframework.web.servlet.view.json.MappingJackson2JsonView" />
4957
+ <bean class="org.springframework.web.servlet.view.json.MappingJackson2JsonView"/>
4958
4958
</mvc:default-views>
4959
4959
</mvc:content-negotiation>
4960
- <mvc:jsp />
4960
+ <mvc:jsp/>
4961
4961
</mvc:view-resolvers>
4962
4962
----
4963
4963
@@ -4973,14 +4973,14 @@ The MVC namespace provides dedicated elements. For example with FreeMarker:
4973
4973
<mvc:view-resolvers>
4974
4974
<mvc:content-negotiation>
4975
4975
<mvc:default-views>
4976
- <bean class="org.springframework.web.servlet.view.json.MappingJackson2JsonView" />
4976
+ <bean class="org.springframework.web.servlet.view.json.MappingJackson2JsonView"/>
4977
4977
</mvc:default-views>
4978
4978
</mvc:content-negotiation>
4979
- <mvc:freemarker cache="false" />
4979
+ <mvc:freemarker cache="false"/>
4980
4980
</mvc:view-resolvers>
4981
4981
4982
4982
<mvc:freemarker-configurer>
4983
- <mvc:template-loader-path location="/freemarker" />
4983
+ <mvc:template-loader-path location="/freemarker"/>
4984
4984
</mvc:freemarker-configurer>
4985
4985
4986
4986
----
@@ -5158,7 +5158,7 @@ XML example:
5158
5158
----
5159
5159
<mvc:resources mapping="/resources/**" location="/public-resources/">
5160
5160
<mvc:resource-chain>
5161
- <mvc:resource-cache />
5161
+ <mvc:resource-cache/>
5162
5162
<mvc:resolvers>
5163
5163
<mvc:version-resolver>
5164
5164
<mvc:content-version-strategy patterns="/**"/>
@@ -5306,11 +5306,11 @@ And the same in XML, use the `<mvc:path-matching>` element:
5306
5306
trailing-slash="false"
5307
5307
registered-suffixes-only="true"
5308
5308
path-helper="pathHelper"
5309
- path-matcher="pathMatcher" />
5309
+ path-matcher="pathMatcher"/>
5310
5310
</mvc:annotation-driven>
5311
5311
5312
- <bean id="pathHelper" class="org.example.app.MyPathHelper" />
5313
- <bean id="pathMatcher" class="org.example.app.MyPathMatcher" />
5312
+ <bean id="pathHelper" class="org.example.app.MyPathHelper"/>
5313
+ <bean id="pathMatcher" class="org.example.app.MyPathMatcher"/>
5314
5314
----
5315
5315
5316
5316
@@ -5373,20 +5373,20 @@ It is also possible to do the same in XML:
5373
5373
<mvc:annotation-driven>
5374
5374
<mvc:message-converters>
5375
5375
<bean class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter">
5376
- <property name="objectMapper" ref="objectMapper" />
5376
+ <property name="objectMapper" ref="objectMapper"/>
5377
5377
</bean>
5378
5378
<bean class="org.springframework.http.converter.xml.MappingJackson2XmlHttpMessageConverter">
5379
- <property name="objectMapper" ref="xmlMapper" />
5379
+ <property name="objectMapper" ref="xmlMapper"/>
5380
5380
</bean>
5381
5381
</mvc:message-converters>
5382
5382
</mvc:annotation-driven>
5383
5383
5384
5384
<bean id="objectMapper" class="org.springframework.http.converter.json.Jackson2ObjectMapperFactoryBean"
5385
5385
p:indentOutput="true"
5386
5386
p:simpleDateFormat="yyyy-MM-dd"
5387
- p:modulesToInstall="com.fasterxml.jackson.module.paramnames.ParameterNamesModule" />
5387
+ p:modulesToInstall="com.fasterxml.jackson.module.paramnames.ParameterNamesModule"/>
5388
5388
5389
- <bean id="xmlMapper" parent="objectMapper" p:createXmlMapper="true" />
5389
+ <bean id="xmlMapper" parent="objectMapper" p:createXmlMapper="true"/>
5390
5390
----
5391
5391
5392
5392
@@ -5470,6 +5470,6 @@ by type and then modifying its properties as necessary. For example:
5470
5470
}
5471
5471
----
5472
5472
5473
- Note that `MyPostProcessor` needs to be included in an `<component scan />` in order for
5473
+ Note that `MyPostProcessor` needs to be included in an `<component scan/>` in order for
5474
5474
it to be detected or if you prefer you can declare it explicitly with an XML bean
5475
5475
declaration.
0 commit comments