Remove reference to Jersey 1

Closes gh-12582
This commit is contained in:
Stephane Nicoll
2018-05-22 10:50:27 +02:00
parent 65738e63fb
commit 699b6ce6dc
7 changed files with 7 additions and 202 deletions

View File

@@ -2763,13 +2763,13 @@ does so, the orders shown in the following table will be used:
[[boot-features-jersey]]
=== JAX-RS and Jersey
If you prefer the JAX-RS programming model for REST endpoints, you can use one of the
available implementations instead of Spring MVC. https://jersey.github.io/[Jersey] 1.x and
http://cxf.apache.org/[Apache CXF] work quite well out of the box if you register their
`Servlet` or `Filter` as a `@Bean` in your application context. Jersey 2.x has some native
Spring support, so we also provide auto-configuration support for it in Spring Boot,
together with a starter.
available implementations instead of Spring MVC. https://jersey.github.io/[Jersey] and
http://cxf.apache.org/[Apache CXF] work quite well out of the box. CXF requires you to
register its `Servlet` or `Filter` as a `@Bean` in your application context. Jersey has
some native Spring support, so we also provide auto-configuration support for it in
Spring Boot, together with a starter.
To get started with Jersey 2.x, include the `spring-boot-starter-jersey` as a dependency
To get started with Jersey, include the `spring-boot-starter-jersey` as a dependency
and then you need one `@Bean` of type `ResourceConfig` in which you register all the
endpoints, as shown in the following example:
@@ -2828,12 +2828,7 @@ the filter registrations can be given init parameters by using `spring.jersey.in
specify a map of properties.
There is a {github-code}/spring-boot-samples/spring-boot-sample-jersey[Jersey sample] so
that you can see how to set things up. There is also a
{github-code}/spring-boot-samples/spring-boot-sample-jersey1[Jersey 1.x sample]. Note
that, in the Jersey 1.x sample, the spring-boot maven plugin has been configured to
unpack some Jersey jars so that they can be scanned by the JAX-RS implementation (because
the sample asks for them to be scanned in its `Filter` registration). If any of your
JAX-RS resources are packaged as nested jars, you may need to do the same.
that you can see how to set things up.