Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jmnarloch/spring-jax-rs-client-proxy
Spring JAX-RS Client Proxy
https://github.com/jmnarloch/spring-jax-rs-client-proxy
Last synced: 4 days ago
JSON representation
Spring JAX-RS Client Proxy
- Host: GitHub
- URL: https://github.com/jmnarloch/spring-jax-rs-client-proxy
- Owner: jmnarloch
- License: apache-2.0
- Created: 2015-02-23T16:22:20.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-08-23T06:18:07.000Z (about 9 years ago)
- Last Synced: 2023-07-26T21:59:22.991Z (over 1 year ago)
- Language: Java
- Homepage:
- Size: 266 KB
- Stars: 10
- Watchers: 2
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Spring JAX-RS Client Proxy
A tool for easier registration of proxy based JAX-RS clients in Spring.
[![Build Status](https://travis-ci.org/jmnarloch/spring-jax-rs-client-proxy.svg?branch=master)](https://travis-ci.org/jmnarloch/spring-jax-rs-client-proxy)
## Features
Simple setup of the JAX-RS client proxies based on the classpath scanning.
## Support
- RESTEasy
- CXF
- Jersey## Setup
In order to start and running simply add the artifact to your Maven/Gradle build.
```
com.github.jmnarloch
spring-jax-rs-client-proxy
1.0.1```
## Example
Start by defining the resource interface annotated with JAX-RS annotations.
```
@Path("/echo")
public interface EchoResource {@GET
String get(@PathParam("name") String name);
}
```Enable the proxy creation on your configuration class and add one of meta annotations: `@EnableRestEasyClient`, `@EnableCxfClient` or `@EnableJerseyClient`.
```
@EnableJaxRsClient(
basePackages = "com.app.rest.api",
serviceUrl = "localhost:8080/api"
)
@EnableRestEasyClient
@Configuration
public class AppConfig {}
```Inject the proxy into any Spring bean.
```
public class Service {@Autowired
private EchoResource echoResource;...
}
```See the [documentation](doc.adoc) for additional examples