| java.lang.Object com.google.inject.spring.SpringIntegration
SpringIntegration | public class SpringIntegration (Code) | | Integrates Guice with Spring.
author: crazybob@google.com (Bob Lee) |
Inner Class :static class SpringProvider implements Provider<T> | |
Inner Class :static class InjectableSpringProvider extends SpringProvider | |
Method Summary | |
public static void | bindAll(Binder binder, ListableBeanFactory beanFactory) Binds all Spring beans from the given factory by name. | static void | bindBean(Binder binder, ListableBeanFactory beanFactory, String name, Class<T> type) | public static Provider<T> | fromSpring(Class<T> type, String name) Creates a provider which looks up objects from Spring using the given name.
Expects a binding to
org.springframework.beans.factory.BeanFactory . |
fromSpring | public static Provider<T> fromSpring(Class<T> type, String name)(Code) | | Creates a provider which looks up objects from Spring using the given name.
Expects a binding to
org.springframework.beans.factory.BeanFactory . Example usage:
bind(DataSource.class)
.toProvider(fromSpring(DataSource.class, "dataSource"));
|
|
|