Spring JAX-RS Client Proxy


License

License

Categories

Categories

CLI User Interface
GroupId

GroupId

com.github.jmnarloch
ArtifactId

ArtifactId

spring-jax-rs-client-proxy
Last Version

Last Version

1.0.2
Release Date

Release Date

Type

Type

jar
Description

Description

Spring JAX-RS Client Proxy
Spring JAX-RS Client Proxy
Project URL

Project URL

https://github.com/jmnarloch/spring-jax-rs-client-proxy
Source Code Management

Source Code Management

https://github.com/jmnarloch/spring-jax-rs-client-proxy.git

Download spring-jax-rs-client-proxy

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.jmnarloch/spring-jax-rs-client-proxy/ -->
<dependency>
    <groupId>com.github.jmnarloch</groupId>
    <artifactId>spring-jax-rs-client-proxy</artifactId>
    <version>1.0.2</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.jmnarloch/spring-jax-rs-client-proxy/
implementation 'com.github.jmnarloch:spring-jax-rs-client-proxy:1.0.2'
// https://jarcasting.com/artifacts/com.github.jmnarloch/spring-jax-rs-client-proxy/
implementation ("com.github.jmnarloch:spring-jax-rs-client-proxy:1.0.2")
'com.github.jmnarloch:spring-jax-rs-client-proxy:jar:1.0.2'
<dependency org="com.github.jmnarloch" name="spring-jax-rs-client-proxy" rev="1.0.2">
  <artifact name="spring-jax-rs-client-proxy" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.jmnarloch', module='spring-jax-rs-client-proxy', version='1.0.2')
)
libraryDependencies += "com.github.jmnarloch" % "spring-jax-rs-client-proxy" % "1.0.2"
[com.github.jmnarloch/spring-jax-rs-client-proxy "1.0.2"]

Dependencies

compile (5)

Group / Artifact Type Version
org.jboss.resteasy : resteasy-client Optional jar 3.0.11.Final
org.apache.cxf : cxf-rt-rs-client Optional jar 3.1.1
org.glassfish.jersey.ext : jersey-proxy-client Optional jar 2.18
org.glassfish.jersey.core : jersey-client Optional jar 2.18
org.springframework : spring-context Optional jar 4.1.6.RELEASE

test (3)

Group / Artifact Type Version
org.mockito : mockito-all jar 1.10.19
junit : junit jar 4.12
org.springframework : spring-test jar 4.1.6.RELEASE

Project Modules

There are no modules declared in this project.

Spring JAX-RS Client Proxy

A tool for easier registration of proxy based JAX-RS clients in Spring.

Build Status

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.

<dependency>
    <groupId>com.github.jmnarloch</groupId>
    <artifactId>spring-jax-rs-client-proxy</artifactId>
    <version>1.0.1</version>
</dependency>

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 for additional examples

Versions

Version
1.0.2
1.0.1
1.0.0