parent
4f194c215d
commit
e7185ea2b1
|
@ -110,7 +110,7 @@ public class FlywayEndpoint {
|
|||
}
|
||||
|
||||
/**
|
||||
* Description of a {@link Flyway} bean, primarly intended for serialization to JSON.
|
||||
* Description of a {@link Flyway} bean, primarily intended for serialization to JSON.
|
||||
*/
|
||||
public static class FlywayDescriptor {
|
||||
|
||||
|
|
|
@ -144,7 +144,7 @@ public class LiquibaseEndpoint {
|
|||
}
|
||||
|
||||
/**
|
||||
* Description of a {@link SpringLiquibase} bean, primarly intended for serialization
|
||||
* Description of a {@link SpringLiquibase} bean, primarily intended for serialization
|
||||
* to JSON.
|
||||
*/
|
||||
public static final class LiquibaseBean {
|
||||
|
|
|
@ -393,8 +393,8 @@ content into your application. Rather, pick only the properties that you need.
|
|||
|
||||
# SPRING MVC ({sc-spring-boot-autoconfigure}/web/servlet/WebMvcProperties.{sc-ext}[WebMvcProperties])
|
||||
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.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.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`.
|
||||
|
@ -1209,7 +1209,7 @@ content into your application. Rather, pick only the properties that you need.
|
|||
management.endpoint.loggers.cache.time-to-live=0ms # Maximum time that a response can be cached.
|
||||
management.endpoint.loggers.enabled= # Whether to enable the loggers endpoint.
|
||||
|
||||
# REQUEST MAPPING ENDPOINT ({sc-spring-boot-actuator-autoconfigure}/web/servlet/RequestMappingEndpoint.{sc-ext}[RequestMappingEndpoint])
|
||||
# REQUEST MAPPING ENDPOINT ({sc-spring-boot-actuator}/web/MappingsEndpoint.{sc-ext}[MappingsEndpoint])
|
||||
management.endpoint.mappings.cache.time-to-live=0ms # Maximum time that a response can be cached.
|
||||
management.endpoint.mappings.enabled= # Whether to enable the mappings endpoint.
|
||||
|
||||
|
|
|
@ -574,7 +574,7 @@ Generally, you can follow the advice from
|
|||
"`<<howto-discover-build-in-options-for-external-properties>>`" about
|
||||
`@ConfigurationProperties` (`ServerProperties` is the main one here). However, you should
|
||||
also look at
|
||||
{dc-spring-boot}/web/servlet/server/WebServerFactoryCustomizer.html[`WebServerFactoryCustomizer`].
|
||||
{dc-spring-boot}/web/server/WebServerFactoryCustomizer.html[`WebServerFactoryCustomizer`].
|
||||
The Jetty APIs are quite rich, so, once you have access to the
|
||||
`JettyServletWebServerFactory`, you can modify it in a number of ways. Alternatively, if
|
||||
you need more control and customization, you can add your own
|
||||
|
|
|
@ -2054,14 +2054,14 @@ used as the favicon of the application.
|
|||
|
||||
|
||||
[[boot-features-spring-mvc-pathmatch]]
|
||||
==== Path Patching and Content Negotiation
|
||||
==== Path Matching and Content Negotiation
|
||||
Spring MVC can map incoming HTTP requests to handlers by looking at the request path and
|
||||
matching it to the mappings defined in your application (for example, `@GetMapping`
|
||||
annotations on Controller methods).
|
||||
|
||||
Spring Boot chooses to disable suffix pattern matching by default, which means that
|
||||
requests like `"GET /projects/spring-boot.json"` won't be matched to
|
||||
`@GetMapping("/project/spring-boot")` mappings.
|
||||
`@GetMapping("/projects/spring-boot")` mappings.
|
||||
This is considered as a
|
||||
{spring-reference}web.html#mvc-ann-requestmapping-suffix-pattern-match[best practice
|
||||
for Spring MVC applications]. This feature was mainly useful in the past for HTTP
|
||||
|
@ -2072,7 +2072,7 @@ is much more reliable.
|
|||
There are other ways to deal with HTTP clients that don't consistently send proper
|
||||
"Accept" request headers. Instead of using suffix matching, we can use a query
|
||||
parameter to ensure that requests like `"GET /projects/spring-boot?format=json"`
|
||||
will be mapped to `@GetMapping("/project/spring-boot")`:
|
||||
will be mapped to `@GetMapping("/projects/spring-boot")`:
|
||||
|
||||
[source,properties,indent=0,subs="verbatim,quotes,attributes"]
|
||||
----
|
||||
|
|
Loading…
Reference in New Issue