Skip to content

Commit 1f7e773

Browse files
committed
Merge branch '3.3.x'
Closes gh-42168
2 parents 2978ca2 + 4d2aa2d commit 1f7e773

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
@@ -293,10 +293,10 @@ spring:
293293
matching-strategy: "ant-path-matcher"
294294
----
295295

296-
By default, Spring MVC will send a 404 Not Found error response if a handler is not found for a request.
297-
To have a `NoHandlerFoundException` thrown instead, set configprop:spring.mvc.throw-exception-if-no-handler-found to `true`.
296+
Spring MVC will throw a `NoHandlerFoundException` if a handler is not found for a request.
298297
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.
299-
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.
298+
If no static content is available, `ResourceHttpRequestHandler` will throw a `NoResourceFoundException`.
299+
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.
300300

301301

302302

0 commit comments

Comments
 (0)