Package nl.vpro.rs
Class ResteasyApplication
- java.lang.Object
-
- javax.ws.rs.core.Application
-
- nl.vpro.rs.ResteasyApplication
-
@ApplicationPath("") public class ResteasyApplication extends javax.ws.rs.core.Application
Static helper to expose a dummy JAX-RS Application. Swagger needs such an application to expose the API docs for the given endpoints.Note, this used to be SwaggerApplication in vpro-shared-swagger. But it's not related to swagger. It has to do with RestEasy.
- Since:
- 2.0
- Author:
- Roelof Jan Koekoek
-
-
Constructor Summary
Constructors Constructor Description ResteasyApplication()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<Class<?>>
getClasses()
static ResteasyApplication
getInstance()
Set<Object>
getSingletons()
static void
inject(Object... services)
Inject Swagger annotated JAX-RS ap's you want to publish.
-
-
-
Method Detail
-
getInstance
public static ResteasyApplication getInstance()
-
getClasses
public Set<Class<?>> getClasses()
- Overrides:
getClasses
in classjavax.ws.rs.core.Application
-
getSingletons
public Set<Object> getSingletons()
- Overrides:
getSingletons
in classjavax.ws.rs.core.Application
-
inject
public static void inject(Object... services)
Inject Swagger annotated JAX-RS ap's you want to publish. Swagger only calls #getSingletons on the first API documentation request, so you must take care that your services get injected before an application accepts web requests. (Using @PostConstruct on your services is a viable solution)- Parameters:
services
-
-
-