...
Check the specification or ask at the users list for more details.
From CXF 2.6.x to CXF 2.7.x
Please check the CXF 2.7 Migration Guide for the information about all the changes affecting the JAX-RS users
Maven dependencies
CXF 3.
...
1.
...
x
The cxf-rt-frontend-jaxrs dependency is required:
Code Block | ||||
---|---|---|---|---|
| ||||
<dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-frontend-jaxrs</artifactId> <version>3.01.0-milestone1<12</version> </dependency> |
This will in turn pull other CXF modules such cxf-core
and cxf-rt-transports-http
, check the pom for more information.
javax.ws.rs/javax.ws.rs-api/2.0
dependency provides JAX-RS 2.0 Final API.
...
Existing JAX-RS 1.1 applications can run in CXF 3.1.x and CXF 3.0.0.
CXF 2.7.0
javax.ws.rs/javax.ws.rs-api/2.0-m10
replaces javax.ws.rs/jsr311-api/1.1.1
. This is very close to JSR-339 Public Release API level. Users can expect very minor differences in the Final Release of API.
Existing JAX-RS 1.1 applications can run in CXF 2.7.x.
CXF 2.6.x
Please check the CXF 2.6 Migration Guide for the information about all the changes affecting the JAX-RS users. Typically adding the frontend jaxrs dependency should be enough.
1. javax.ws.rs/jsr311-api/1.1.1
Optional providers (including the default JSONProvider) are located in this module:
...
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-extension-providers</artifactId>
<version>2.6.0</version>
</dependency>
x.
CXF JAX-RS bundle
Note CXF JAX-RS bundle has been removed in CXF 3.0.0.
The Search extension is now located in
...
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-extension-search</artifactId>
<version>2.6.0</version>
</dependency>
Setting up the classpath
If Maven is not used then the following JARs will need to be available at the runtime classpath.
For CXF 3.0.0:
TODO
For CXF 2.7.x:
TODO
CXF JAX-RS bundle
Note CXF JAX-RS bundle has been removed in CXF 3.0.0. Prefer depending on the JAX-RS frontend directly. In CXF 3.0.0 a complete CXF all-inclusive bundle can still be used if really needed.
...
Code Block | ||||
---|---|---|---|---|
| ||||
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-bundle-jaxrs</artifactId>
<version>${cxf.version}</version>
<exclusions>
<exclusion>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
</exclusion>
</exclusions>
</dependency>
|
...
/dependency>
|
What is New
- Complete support for JAX-RS 2.1, please see JAX-RS Basics for more information
- [Server NIO extension] based on the early JAX-RS 2.1 API prototype.
- Complete support for JAX-RS 2.0, please see JAX-RS Basics for more information
- Bean Validation 1.1 Support, please see http://cxf.apache.org/docs/validationfeature.html for more information
- Swagger Feature for generating Swagger API documentation from JAX-RS endpoints
Getting Started with JAX-RS
Understanding the Basics
- information
- Swagger Feature for generating Swagger API documentation from JAX-RS endpoints
Getting Started with JAX-RS
Understanding the Basics
You are encouraged to read JAX-RS 2.1 JSR-370 specification to find out the information not covered by this documentation. The specification enhances JAX-RS 2.0 by introducing a support for Reactive Client API extensions, Server Sent Events (client and server), returning CompletableFuture from the resource methods and the sub-resource classes (as opposed to instances) from the sub-resource locators.
You are also encouraged to read JAX-RS 2.0 You are encouraged to read JSR-339 specification to find out the information not covered by this documentation. The specification introduces many terms such as root resources, resource methods, sub-resources and sub-resource locators, message body readers and writers. JAX-RS 2.0 additionally introduces filters, interceptors, new client API, features, new exception classes, server-side support for asynchronous invocations.
...