public class SpringIntegration
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
bindAll(Binder binder,
org.springframework.beans.factory.ListableBeanFactory beanFactory)
Binds all Spring beans from the given factory by name.
|
static <T> Provider<T> |
fromSpring(java.lang.Class<T> type,
java.lang.String name)
Creates a provider which looks up objects from Spring using the given name.
|
public static <T> Provider<T> fromSpring(java.lang.Class<T> type, java.lang.String name)
BeanFactory
. Example usage:
bind(DataSource.class) .toProvider(fromSpring(DataSource.class, "dataSource"));
public static void bindAll(Binder binder, org.springframework.beans.factory.ListableBeanFactory beanFactory)
@Named("foo")
.Named
,
Names.named(String)