You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To use Jersey alongside another web framework, such as Spring MVC, it should be configured so that it will allow the other framework to handle requests that it cannot handle.
1234
+
First, configure Jersey to use a Filter rather than a Servlet by configuring the configprop:spring.jersey.type[] application property with a value of `filter`.
1235
+
Second, configure your `ResourceConfig` to forward requests that would have resulted in a 404, as shown in the following example.
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -443,6 +443,7 @@ TIP: See {spring-boot-actuator-autoconfigure-module-code}/endpoint/web/CorsEndpo
443
443
=== Implementing Custom Endpoints
444
444
If you add a `@Bean` annotated with `@Endpoint`, any methods annotated with `@ReadOperation`, `@WriteOperation`, or `@DeleteOperation` are automatically exposed over JMX and, in a web application, over HTTP as well.
445
445
Endpoints can be exposed over HTTP using Jersey, Spring MVC, or Spring WebFlux.
446
+
If both Jersey and Spring MVC are available, Spring MVC will be used.
446
447
447
448
You can also write technology-specific endpoints by using `@JmxEndpoint` or `@WebEndpoint`.
448
449
These endpoints are restricted to their respective technologies.
@@ -494,6 +495,7 @@ Before calling an operation method, the input received via JMX or an HTTP reques
494
495
[[production-ready-endpoints-custom-web]]
495
496
==== Custom Web Endpoints
496
497
Operations on an `@Endpoint`, `@WebEndpoint`, or `@EndpointWebExtension` are automatically exposed over HTTP using Jersey, Spring MVC, or Spring WebFlux.
498
+
If both Jersey and Spring MVC are available, Spring MVC will be used.
497
499
498
500
499
501
@@ -987,6 +989,7 @@ The default convention is to use the `id` of the endpoint with a prefix of `/act
987
989
For example, `health` is exposed as `/actuator/health`.
988
990
989
991
TIP: Actuator is supported natively with Spring MVC, Spring WebFlux, and Jersey.
992
+
If both Jersey and Spring MVC are available, Spring MVC will be used.
0 commit comments