The RESTEasy Spring Boot starters can be used by any regular Spring Boot application that wants to have REST endpoints and prefers RESTEasy as the JAX-RS implementation. They integrate with Spring as expected, which means every JAX-RS REST resource that is also a Spring bean will be automatically auto-scanned, integrated, and available. There are two flavors of starters available that provide integration with the following types of application servers:
This project has been kindly donated by PayPal. Please refer to https://github.com/paypal/resteasy-spring-boot for old versions.
Add the Maven dependency below to your Spring Boot application pom file.
Servlet
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-servlet-spring-boot-starter</artifactId>
<version>6.2.1-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
Reactor Netty
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-reactor-netty-spring-boot-starter</artifactId>
<version>6.2.1-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
Just define your JAX-RS application class (a subclass of Application) as a Spring bean, and it will be automatically registered. See the example below. See section JAX-RS application registration methods in How to use RESTEasy Spring Boot Starter for further information.
package com.sample.app;
import org.springframework.stereotype.Component;
import jakarta.ws.rs.ApplicationPath;
import jakarta.ws.rs.core.Application;
@Component
@ApplicationPath("/sample-app/")
public class JaxrsApplication extends Application {
}
Just define them as Spring beans, and they will be automatically registered. Notice that JAX-RS resources can be singleton or request scoped, while JAX-RS providers must be singletons.
See How to use RESTEasy Spring Boot Starter.
Servlet
Reactor Netty
Please open an issue using JIRA (be sure to set Spring / Spring Boot in the Component/s field).
To contact us, please use RESTEasy mailing lists.
This project is licensed under the Apache 2 License.