public class SpringIntegration extends 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(Class<T> type,
String name)
Creates a provider which looks up objects from Spring using the given name.
|
public static <T> Provider<T> fromSpring(Class<T> type, 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)
Copyright © 2006-2014 Google, Inc.. All Rights Reserved.