Guestful OSS - Jersey Container API
Discover cotainer implementation from classpath and loads your JAX-RS resource.
Checkout last version here
Add in your POM:
<repositories>
<repository>
<id>bintray</id>
<url>http://dl.bintray.com/guestful/maven</url>
</repository>
</repositories>
and
<dependency>
<groupId>com.guestful.module</groupId>
<artifactId>guestful.module.jersey-container</artifactId>
<version>?</version>
</dependency>
Then choose between these two implementation:
GApplication
is a subclass of ResourceConfig
.
class Main extends GApplication {
@Override
void configure(Container container) {
container
.setPort(8080)
.setMaxWorkers(50) // determine max. concurrent request threads (i.e. 50 is a max for Heroku)
.setContextPath('/api')
}
@Override
void initialize() {
//register your resources here
registerClasses(
RootResource,
MonitoringResource
// etc.
)
}
// start your app
public static void main(String... args) throws Exception {
new Main().run(args);
}
}