Skip to content

Commit b259f0d

Browse files
committed
Mention suffix pattern match in contentnegotiationmanager doc
Issue: SPR-11172
1 parent e53edbc commit b259f0d

File tree

1 file changed

+15
-35
lines changed

1 file changed

+15
-35
lines changed

src/asciidoc/index.adoc

Lines changed: 15 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -762,16 +762,10 @@ in the public domain for alternative approaches, and your mileage may vary depen
762762
the exact version and feature set of the container.
763763

764764

765-
766-
767-
768-
769765
[[spring-whats-new]]
770-
= What's New in Spring 3
771-
772-
773-
766+
= What's New in Spring 4
774767

768+
= What's New in Spring 3
775769

776770
[[new-in-3.0]]
777771
== New Features and Enhancements in Spring Framework 3.0
@@ -789,8 +783,6 @@ introducing some early support for Java EE 6.
789783
****
790784

791785

792-
793-
794786
[[new-in-3.0-intro]]
795787
=== Java 5
796788
The entire framework code has been revised to take advantage of Java 5 features like
@@ -1459,24 +1451,6 @@ Servlet container. Server-side tests involve use of the `DispatcherServlet` whil
14591451
client-side REST tests rely on the `RestTemplate`. See <<spring-mvc-test-framework>>.
14601452

14611453

1462-
1463-
1464-
[[new-in-3.2-webmvc-content-negotiation]]
1465-
=== Content negotiation improvements
1466-
A `ContentNegotiationStrategy` is now available for resolving the requested media types
1467-
from an incoming request. The available implementations are based on the file extension,
1468-
query parameter, the 'Accept' header, or a fixed content type. Equivalent options were
1469-
previously available only in the ContentNegotiatingViewResolver but are now available
1470-
throughout.
1471-
1472-
`ContentNegotiationManager` is the central class to use when configuring content
1473-
negotiation options. For more details see <<mvc-config-content-negotiation>>.
1474-
1475-
The introduction of `ContentNegotiationManger` also enables selective suffix pattern
1476-
matching for incoming requests. For more details, see the Javadoc of
1477-
http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerMapping.html#setUseRegisteredSuffixPatternMatch(boolean)[RequestMappingHandlerMapping.setUseRegisteredSuffixPatternMatch].
1478-
1479-
14801454
[[new-in-3.2-matrix-variables]]
14811455
=== Matrix variables
14821456
A new `@MatrixVariable` annotation adds support for extracting matrix variables from the
@@ -32221,19 +32195,25 @@ And in XML use the `<mvc:interceptors>` element:
3222132195

3222232196
[[mvc-config-content-negotiation]]
3222332197
==== Configuring Content Negotiation
32224-
Staring with Spring Framework 3.2, you can configure how Spring MVC determines the
32225-
requested media types from the client for request mapping as well as for content
32226-
negotiation purposes. The available options are to check the file extension in the
32227-
request URI, the "Accept" header, a request parameter, as well as to fall back on a
32228-
default content type. By default, file extension in the request URI is checked first and
32229-
the "Accept" header is checked next.
32198+
You can configure how Spring MVC determines the requested media types from the client
32199+
for request mapping as well as for content negotiation purposes. The available options
32200+
are to check the file extension in the request URI, the "Accept" header, a request
32201+
parameter, as well as to fall back on a default content type. By default, file extension
32202+
in the request URI is checked first and the "Accept" header is checked next.
3223032203

3223132204
For file extensions in the request URI, the MVC Java config and the MVC namespace,
3223232205
automatically register extensions such as `.json`, `.xml`, `.rss`, and `.atom` if the
3223332206
corresponding dependencies such as Jackson, JAXB2, or Rome are present on the classpath.
3223432207
Additional extensions may be not need to be registered explicitly if they can be
3223532208
discovered via `ServletContext.getMimeType(String)` or the __Java Activation Framework__
32236-
(see `javax.activation.MimetypesFileTypeMap`).
32209+
(see `javax.activation.MimetypesFileTypeMap`). You can register more extensions with the
32210+
http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerMapping.html#setUseRegisteredSuffixPatternMatch(boolean)[setUseRegisteredSuffixPatternMatch
32211+
method].
32212+
32213+
The introduction of `ContentNegotiationManger` also enables selective suffix pattern
32214+
matching for incoming requests. For more details, see the Javadoc of
32215+
32216+
3223732217

3223832218
Below is an example of customizing content negotiation options through the MVC Java
3223932219
config:

0 commit comments

Comments
 (0)