org.restler:restler-spring-mvc

Restler is a library that generates a client of a web service by its annotated Spring controller interface at runtime.

License

License

Categories

Categories

Spring MVC User Interface Web Frameworks
GroupId

GroupId

org.restler
ArtifactId

ArtifactId

restler-spring-mvc
Last Version

Last Version

0.5.1
Release Date

Release Date

Type

Type

jar
Description

Description

Restler is a library that generates a client of a web service by its annotated Spring controller interface at runtime.

Download restler-spring-mvc

How to add to project

<!-- https://jarcasting.com/artifacts/org.restler/restler-spring-mvc/ -->
<dependency>
    <groupId>org.restler</groupId>
    <artifactId>restler-spring-mvc</artifactId>
    <version>0.5.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.restler/restler-spring-mvc/
implementation 'org.restler:restler-spring-mvc:0.5.1'
// https://jarcasting.com/artifacts/org.restler/restler-spring-mvc/
implementation ("org.restler:restler-spring-mvc:0.5.1")
'org.restler:restler-spring-mvc:jar:0.5.1'
<dependency org="org.restler" name="restler-spring-mvc" rev="0.5.1">
  <artifact name="restler-spring-mvc" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.restler', module='restler-spring-mvc', version='0.5.1')
)
libraryDependencies += "org.restler" % "restler-spring-mvc" % "0.5.1"
[org.restler/restler-spring-mvc "0.5.1"]

Dependencies

compile (7)

Group / Artifact Type Version
org.restler : restler-core jar 0.5.1
org.slf4j : jcl-over-slf4j jar 1.7.12
com.fasterxml.jackson.core : jackson-databind jar 2.8.5
asm : asm jar 3.3.1
cglib : cglib-nodep jar 3.1
org.objenesis : objenesis jar 2.1
org.slf4j : slf4j-api jar 1.7.5

provided (1)

Group / Artifact Type Version
org.springframework : spring-webmvc jar 4.3.4.RELEASE

test (3)

Group / Artifact Type Version
org.codehaus.groovy.maven.runtime : gmaven-runtime-api jar 1.0
org.codehaus.groovy : groovy-all jar 2.4.3
org.spockframework : spock-core jar 1.0-groovy-2.4

Project Modules

There are no modules declared in this project.

Build Status Maven Central

Restler

Overview

Restler is a library that automatically generates a client for a web service at run time, by analyzing the respective annotated Spring controller interface. Restler may help you remove HTTP-specific boilerplate from your integration tests, microservices and thirdparty HTTP API clients.

EPA warning: Restler currently is in early public access stage and it is neither feature complete, tested in production or backward compatible

Features

  • Easily extensible architecture
  • Custom authentication, authorization and errors mapping strategies
  • Support of form-based, http basic, cookie-based and generic header-based authentication
  • Support of async controllers through methods returning Future, DefferedResult or Callable objects
  • Experemental Spring Data REST support

Simple Usage Example

Suppose you have the following interface on the server:

/** 
  * An annotated Spring controller interface
  */
@Controller
@RequestMapping("greeter")
public interface Greeter {

	@RequestMapping("greetings/{language}")	
	String getGreeting(@PathVariable String language, @RequestParam(defaultValue = "Anonymous") String name); 

}

Then in your client you can invoke the getGreeting method of the remote service using the following code snippet:

Service service = new Restler("https://www.example.com/api", new SpringMvcSupport()).build();
Greeter greeter = service.produceClient(Greeter.class);
String greeting = greeter.getGreeting("en","Buddy"); // the result of https://www.example.com/api/greeter/greetings/en?name=Buddy call
org.restler

Excelsior LLC

We make Excelsior JET, a compliant Java SE JVM with AOT compiler. These are our open source projects.

Versions

Version
0.5.1
0.5.0
0.4.2
0.4.1
0.4.0