Skip to content

Commit 16cb736

Browse files
committed
Fixed ContentNegotiationManager reference in MVC docs
Issue: SPR-13558
1 parent 196adbd commit 16cb736

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

src/asciidoc/index.adoc

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32623,7 +32623,7 @@ To support the resolution of a view based on a file extension, use the
3262332623
extensions to media types. For more information on the algorithm used to determine the
3262432624
request media type, refer to the API documentation for `ContentNegotiatingViewResolver`.
3262532625

32626-
Here is an example configuration of a `ContentNegotiatingViewResolver:`
32626+
Here is an example configuration of a `ContentNegotiatingViewResolver`:
3262732627

3262832628
[source,xml,indent=0]
3262932629
[subs="verbatim,quotes"]
@@ -32647,7 +32647,7 @@ Here is an example configuration of a `ContentNegotiatingViewResolver:`
3264732647
</property>
3264832648
<property name="defaultViews">
3264932649
<list>
32650-
<bean class="org.springframework.web.servlet.view.json.MappingJackson2JsonView" />
32650+
<bean class="org.springframework.web.servlet.view.json.MappingJackson2JsonView"/>
3265132651
</list>
3265232652
</property>
3265332653
</bean>
@@ -34054,7 +34054,7 @@ context defined):
3405434054
http://www.springframework.org/schema/mvc
3405534055
http://www.springframework.org/schema/mvc/spring-mvc.xsd">
3405634056

34057-
<mvc:annotation-driven />
34057+
<mvc:annotation-driven/>
3405834058

3405934059
</beans>
3406034060
----
@@ -34191,15 +34191,15 @@ And in XML use the `<mvc:interceptors>` element:
3419134191
[subs="verbatim"]
3419234192
----
3419334193
<mvc:interceptors>
34194-
<bean class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor" />
34194+
<bean class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor"/>
3419534195
<mvc:interceptor>
3419634196
<mvc:mapping path="/**"/>
3419734197
<mvc:exclude-mapping path="/admin/**"/>
34198-
<bean class="org.springframework.web.servlet.theme.ThemeChangeInterceptor" />
34198+
<bean class="org.springframework.web.servlet.theme.ThemeChangeInterceptor"/>
3419934199
</mvc:interceptor>
3420034200
<mvc:interceptor>
3420134201
<mvc:mapping path="/secure/*"/>
34202-
<bean class="org.example.SecurityInterceptor" />
34202+
<bean class="org.example.SecurityInterceptor"/>
3420334203
</mvc:interceptor>
3420434204
</mvc:interceptors>
3420534205
----
@@ -34250,11 +34250,11 @@ that in turn can be created with a `ContentNegotiationManagerFactoryBean`:
3425034250
[source,xml,indent=0]
3425134251
[subs="verbatim,quotes"]
3425234252
----
34253-
<mvc:annotation-driven content-negotiation-manager="contentNegotiationManager" />
34253+
<mvc:annotation-driven content-negotiation-manager="contentNegotiationManager"/>
3425434254

3425534255
<bean id="contentNegotiationManager" class="org.springframework.web.accept.ContentNegotiationManagerFactoryBean">
34256-
<property name="favorPathExtension" value="false" />
34257-
<property name="favorParameter" value="true" />
34256+
<property name="favorPathExtension" value="false"/>
34257+
<property name="favorParameter" value="true"/>
3425834258
<property name="mediaTypes" >
3425934259
<value>
3426034260
json=application/json
@@ -34270,7 +34270,7 @@ for request mapping purposes, and `RequestMappingHandlerAdapter` and
3427034270
`ExceptionHandlerExceptionResolver` for content negotiation purposes.
3427134271

3427234272
Note that `ContentNegotiatingViewResolver` now can also be configured with a
34273-
`ContentNegotiatingViewResolver`, so you can use one instance throughout Spring MVC.
34273+
`ContentNegotiationManager`, so you can use one instance throughout Spring MVC.
3427434274

3427534275
In more advanced cases, it may be useful to configure multiple
3427634276
`ContentNegotiationManager` instances that in turn may contain custom
@@ -34346,10 +34346,10 @@ And the same in XML:
3434634346
<mvc:view-resolvers>
3434734347
<mvc:content-negotiation>
3434834348
<mvc:default-views>
34349-
<bean class="org.springframework.web.servlet.view.json.MappingJackson2JsonView" />
34349+
<bean class="org.springframework.web.servlet.view.json.MappingJackson2JsonView"/>
3435034350
</mvc:default-views>
3435134351
</mvc:content-negotiation>
34352-
<mvc:jsp />
34352+
<mvc:jsp/>
3435334353
</mvc:view-resolvers>
3435434354
----
3435534355

@@ -34365,14 +34365,14 @@ The MVC namespace provides dedicated elements. For example with FreeMarker:
3436534365
<mvc:view-resolvers>
3436634366
<mvc:content-negotiation>
3436734367
<mvc:default-views>
34368-
<bean class="org.springframework.web.servlet.view.json.MappingJackson2JsonView" />
34368+
<bean class="org.springframework.web.servlet.view.json.MappingJackson2JsonView"/>
3436934369
</mvc:default-views>
3437034370
</mvc:content-negotiation>
34371-
<mvc:freemarker cache="false" />
34371+
<mvc:freemarker cache="false"/>
3437234372
</mvc:view-resolvers>
3437334373

3437434374
<mvc:freemarker-configurer>
34375-
<mvc:template-loader-path location="/freemarker" />
34375+
<mvc:template-loader-path location="/freemarker"/>
3437634376
</mvc:freemarker-configurer>
3437734377

3437834378
----
@@ -34689,11 +34689,11 @@ And the same in XML, use the `<mvc:path-matching>` element:
3468934689
trailing-slash="false"
3469034690
registered-suffixes-only="true"
3469134691
path-helper="pathHelper"
34692-
path-matcher="pathMatcher" />
34692+
path-matcher="pathMatcher"/>
3469334693
</mvc:annotation-driven>
3469434694

34695-
<bean id="pathHelper" class="org.example.app.MyPathHelper" />
34696-
<bean id="pathMatcher" class="org.example.app.MyPathMatcher" />
34695+
<bean id="pathHelper" class="org.example.app.MyPathHelper"/>
34696+
<bean id="pathMatcher" class="org.example.app.MyPathMatcher"/>
3469734697
----
3469834698

3469934699

0 commit comments

Comments
 (0)