@Retention(value=RUNTIME) @Target(value=TYPE) @Inherited public @interface RequiresService
Component to make annotated bean lazy. Bean instance will
be created only when specified service will be available. Until then, class will not be
initialized to prevent any NoClassDefFoundError errors.
Usual scenario is to create interface (interfaces are required to create JDK proxy) and implementation class that will act as bridge between required optional dependency.
| Modifier and Type | Required Element and Description |
|---|---|
Class<?>[] |
interfaceClass
Interface class for proxy creation.
|
String |
service
Required service class name
|
public abstract String service
public abstract Class<?>[] interfaceClass
public abstract String filter
Copyright © 2024 Suncode. All rights reserved.