The aim of this project is to integrate gwt-jackson-apt with autorest.
- First add the dependency for domino-autorest-jackson
<dependency>
<groupId>org.dominokit</groupId>
<artifactId>domino-autorest-jackson</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.dominokit</groupId>
<artifactId>autorest-jackson</artifactId>
<version>1.0-SNAPSHOT</version>
<classifier>sources</classifier>
</dependency>
- Add snapshots repository in your pom.xml
<repositories>
<repository>
<id>sonatype-snapshots-repo</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>fail</checksumPolicy>
</snapshots>
</repository>
</repositories>
- Add jackson-apt-processor dependency
<dependency>
<groupId>org.dominokit.jacksonapt</groupId>
<artifactId>jackson-apt-processor</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
- Add the module in your *.gwt.xml
<inherits name="org.dominokit.autorest.jackson.JacksonAutoRest"/>
- Define package-info.java file and annotate it with
@JSONRegistration
annotation passing your module name:
@JSONRegistration("Foo")
package com.foo;
import org.dominokit.jacksonapt.annotation.JSONRegistration;
- Use
JacksonResourceBuilder
and pass it the generated registry as follows:
new JacksonResourceBuilder(new FooJsonRegistry());