Move spring.mvc.media-types to content-negotiation

This commit moves "spring.mvc.media-types" to the
"spring.mvc.content-negotiation.*" namespaces introduced in gh-11105.

Closes gh-11636
This commit is contained in:
Brian Clozel
2018-01-16 10:30:39 +01:00
parent 76057be9ac
commit 1e648801bd
6 changed files with 31 additions and 21 deletions

View File

@@ -395,6 +395,7 @@ content into your application. Rather, pick only the properties that you need.
spring.mvc.async.request-timeout= # Amount of time before asynchronous request handling times out.
spring.mvc.content-negotiation.favor-path-extension=false # Whether the path extension in the URL path should be used to determine the requested media type.
spring.mvc.content-negotiation.favor-parameter=false # Whether a request parameter ("format" by default) should be used to determine the requested media type.
spring.mvc.content-negotiation.media-types.*= # Maps file extensions to media types for content negotiation.
spring.mvc.content-negotiation.parameter-name= # Query parameter name to use when "favor-parameter" is enabled.
spring.mvc.date-format= # Date format to use. For instance, `dd/MM/yyyy`.
spring.mvc.dispatch-trace-request=false # Whether to dispatch TRACE requests to the FrameworkServlet doService method.
@@ -405,9 +406,8 @@ content into your application. Rather, pick only the properties that you need.
spring.mvc.locale= # Locale to use. By default, this locale is overridden by the "Accept-Language" header.
spring.mvc.locale-resolver=accept-header # Define how the locale should be resolved.
spring.mvc.log-resolved-exception=false # Whether to enable warn logging of exceptions resolved by a "HandlerExceptionResolver".
spring.mvc.media-types.*= # Maps file extensions to media types for content negotiation.
spring.mvc.message-codes-resolver-format= # Formatting strategy for message codes. For instance, `PREFIX_ERROR_CODE`.
spring.mvc.path-match.use-registered-suffix-pattern=false # Whether suffix pattern matching should work only against path extensions explicitly registered with "spring.mvc.media-types.*".
spring.mvc.path-match.use-registered-suffix-pattern=false # Whether suffix pattern matching should work only against extensions registered with "spring.mvc.content-negotiation.media-types.*".
spring.mvc.path-match.use-suffix-pattern=false # Whether to use suffix pattern match (".*") when matching patterns to requests.
spring.mvc.servlet.load-on-startup=-1 # Load on startup priority of the Spring Web Services servlet.
spring.mvc.static-path-pattern=/** # Path pattern used for static resources.

View File

@@ -2082,7 +2082,7 @@ will be mapped to `@GetMapping("/project/spring-boot")`:
# spring.mvc.content-negotiation.parameter-name=myparam
# We can also register additional file extensions/media types with:
spring.mvc.media-types.markdown=text/markdown
spring.mvc.content-negotiation.media-types.markdown=text/markdown
----
If you understand the caveats and would still like your application to use
@@ -2096,7 +2096,7 @@ suffix pattern matching, the following configuration is required:
# spring.mvc.path-match.use-registered-suffix-pattern=true
# We can also register additional file extensions/media types with:
# spring.mvc.media-types.adoc=text/asciidoc
# spring.mvc.content-negotiation.media-types.adoc=text/asciidoc
----