Skip to content

Commit 43dd3cf

Browse files
committed
Polish "Improve Path Matching and Content Negotiation docs"
See gh-14977
1 parent 113abbe commit 43dd3cf

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

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

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2257,18 +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-
2261-
#Whether to use suffix pattern match (".*") when matching patterns to requests
22622260
spring.mvc.pathmatch.use-suffix-pattern=true
2261+
----
22632262

2264-
# You can also restrict that feature to known extensions only
2265-
# 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:
22662265

2267-
# 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:
22682272
# spring.mvc.contentnegotiation.media-types.adoc=text/asciidoc
22692273
----
22702274

22712275

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

0 commit comments

Comments
 (0)