根据Bean注册的名称获取Bean对象
一个通过Bean名称获取Bean的对象实例的一个类,现在复习下Spring,再此处记录下:
package net.shopxx.util;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;
/**
* 工具类 - Spring
*/
@Component
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;
/**
* 工具类 - Spring
*/
@Component