Skip to content

Commit 4d2aa2d

Browse files
committed
Merge branch '3.2.x' into 3.3.x
Closes gh-42167
2 parents f471990 + f813079 commit 4d2aa2d

File tree

1 file changed

+3
-3
lines changed
  • spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/web

1 file changed

+3
-3
lines changed

spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/web/servlet.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,10 +296,10 @@ spring:
296296
matching-strategy: "ant-path-matcher"
297297
----
298298

299-
By default, Spring MVC will send a 404 Not Found error response if a handler is not found for a request.
300-
To have a `NoHandlerFoundException` thrown instead, set configprop:spring.mvc.throw-exception-if-no-handler-found to `true`.
299+
Spring MVC will throw a `NoHandlerFoundException` if a handler is not found for a request.
301300
Note that, by default, the xref:web/servlet.adoc#web.servlet.spring-mvc.static-content[serving of static content] is mapped to `+/**+` and will, therefore, provide a handler for all requests.
302-
For a `NoHandlerFoundException` to be thrown, you must also set configprop:spring.mvc.static-path-pattern[] to a more specific value such as `/resources/**` or set configprop:spring.web.resources.add-mappings[] to `false` to disable serving of static content entirely.
301+
If no static content is available, `ResourceHttpRequestHandler` will throw a `NoResourceFoundException`.
302+
For a `NoHandlerFoundException` to be thrown, set configprop:spring.mvc.static-path-pattern[] to a more specific value such as `/resources/**` or set configprop:spring.web.resources.add-mappings[] to `false` to disable serving of static content entirely.
303303

304304

305305

0 commit comments

Comments
 (0)