Skip to content

Commit a8ac091

Browse files
committed
Merge pull request #14977 from nishantraut
* pr/14977: Polish "Improve Path Matching and Content Negotiation docs" Improve Path Matching and Content Negotiation docs
2 parents 33c7a74 + 43dd3cf commit a8ac091

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2257,15 +2257,23 @@ suffix pattern matching, the following configuration is required:
22572257
[source,properties,indent=0,subs="verbatim,quotes,attributes"]
22582258
----
22592259
spring.mvc.contentnegotiation.favor-path-extension=true
2260+
spring.mvc.pathmatch.use-suffix-pattern=true
2261+
----
22602262

2261-
# You can also restrict that feature to known extensions only
2262-
# spring.mvc.pathmatch.use-registered-suffix-pattern=true
2263+
Alternatively, rather than open all suffix patterns, it's more secure to just support
2264+
registered suffix patterns:
22632265

2264-
# We can also register additional file extensions/media types with:
2266+
[source,properties,indent=0,subs="verbatim,quotes,attributes"]
2267+
----
2268+
spring.mvc.contentnegotiation.favor-path-extension=true
2269+
spring.mvc.pathmatch.use-registered-suffix-pattern=true
2270+
2271+
# You can also register additional file extensions/media types with:
22652272
# spring.mvc.contentnegotiation.media-types.adoc=text/asciidoc
22662273
----
22672274

22682275

2276+
22692277
[[boot-features-spring-mvc-web-binding-initializer]]
22702278
==== ConfigurableWebBindingInitializer
22712279
Spring MVC uses a `WebBindingInitializer` to initialize a `WebDataBinder` for a

0 commit comments

Comments
 (0)