Skip to content

janScheible/resty-gwt-with-spring-mvc

 
 

Repository files navigation

Purpose of this fork

The purpose of this fork is to allow usage of Spring MVC annotations with RestyGWT instead of JAX-RS annotations. It is targeted to a Spring only environment where GWT is used just as the frontend. The backend is pure Spring MVC without any GWT dependencies (see the sample projects with-common-project and two-projects-only).

public interface DirectSpringMvcExampleService extends DirectRestService {

    @RequestMapping(path = "/entities/{id}", method = GET)
    EntityDto getExampleDtos(@PathVariable("id") String id);

    @RequestMapping(path = "/entities", method = POST, consumes = {"application/json"})
    EntityDto storeDto(EntityDto entity);
}
WARNING
It looks like Spring MVC annotations on method arguments must be placed both on the interface and on the implementation class (on the interface for RestyGWT and on the implementation for Spring itself).
NOTE
The easiest way to debug the Spring MVC extension is to add the property <gwt.extraJvmArgs>-Xmx512m -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=1044</gwt.extraJvmArgs> to the Maven POM and attach a remote debbuger to the execution of the GWT compiler when running with Maven. Thereby is the class RestAnnotationValueProvider a good candidate for setting breakpoints because it contains the annotation abstraction over JAX-RS and Spring MVC.
NOTE
In case of errors occuring during the GWT compilation the file generated by RestyGWT can be found and checked in ${project.build.directory}/.generated.

RestyGWT

  • Build Status

To know more have a look to RestyGWT web site

Description

RestyGWT is a GWT generator for REST services and JSON encoded data transfer objects.

Features

  • Generates Async Restful JSON based service proxies
  • Java Object to JSON encoding/decoding
  • Easy to use REST API

About

Like GWT-RPC but with REST/JSON coolness

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 95.0%
  • Ruby 2.7%
  • HTML 2.0%
  • CSS 0.3%