public class SpringRestResourceResolver extends BasicRestResourceResolver
RestResourceResolver for resolving resource classes using Spring.
Used for resolving resource classes defined via Rest.children().
A typical usage pattern for registering a Juneau REST resource class is shown below:
RestResourceResolver.NullBASIC, FUZZY| Constructor and Description |
|---|
SpringRestResourceResolver(org.springframework.context.ApplicationContext ctx)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
<T> T |
resolve(Object parent,
Class<T> c,
RestContextBuilder builder,
Object... args)
Resolves the specified class to a resource object.
|
resolveclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitresolvepublic SpringRestResourceResolver(org.springframework.context.ApplicationContext ctx)
ctx - The spring application context object.public <T> T resolve(Object parent, Class<T> c, RestContextBuilder builder, Object... args)
RestResourceResolverSubclasses can override this method to provide their own custom resolution.
The default implementation simply creates a new class instance using Class.newInstance().
resolve in interface RestResourceResolverresolve in class BasicRestResourceResolverparent - The parent resource (i.e. the instance whose class has the @Rest(children) annotation.c - The class to resolve.builder - The initialization configuration for the resource.args - Optional arguments to pass to constructorCopyright © 2016–2019 The Apache Software Foundation. All rights reserved.