From fd3d6196702415aaa58b17d6bbe1707d0ff8ca86 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Thu, 13 May 2021 13:58:07 +0100 Subject: [PATCH] Recommend default Servlet when using Jersey as a Filter Closes gh-25733 --- .../src/docs/asciidoc/spring-boot-features.adoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/spring-boot-features.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/spring-boot-features.adoc index 2382533bf8..0f215aa1bd 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/spring-boot-features.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/spring-boot-features.adoc @@ -3401,6 +3401,8 @@ By default, the servlet is initialized lazily, but you can customize that behavi You can disable or override that bean by creating one of your own with the same name. You can also use a filter instead of a servlet by setting `spring.jersey.type=filter` (in which case, the `@Bean` to replace or override is `jerseyFilterRegistration`). The filter has an `@Order`, which you can set with `spring.jersey.filter.order`. +When using Jersey as a filter, a Servlet that will handle any requests that are not intercepted by Jersey must be present. +If your application does not contain such a servlet, you may want to enable the default servlet by setting configprop:server.servlet.register-default-servlet[] to `true`. Both the servlet and the filter registrations can be given init parameters by using `spring.jersey.init.*` to specify a map of properties.