
org.enodeframework.spring.SpringObjectContainer Maven / Gradle / Ivy
package org.enodeframework.spring;
import org.enodeframework.common.container.IObjectContainer;
import org.springframework.context.ApplicationContext;
/**
* Spring Ioc容器
*
* @author [email protected]
*/
public class SpringObjectContainer implements IObjectContainer {
private final ApplicationContext applicationContext;
public SpringObjectContainer(ApplicationContext applicationContext) {
this.applicationContext = applicationContext;
}
@Override
public TService resolve(Class serviceType) {
return applicationContext.getBean(serviceType);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy