**由于公司电脑限制,完全手敲,有单字错误望理解**
@component
@SuppressWarnings("static-access")
public class AppContext implements ApplicationContextAware{
private static Logger = loggerFactory.getLogger(AppContext.class);
private static AppConttext instance;
private static ApplicationContext applicationContext;
//下面这一步,是这个变成一个有双重功能的类,既有工具类的功能又有获取bean的功能
@PostConstruct
public void init(){
instance =this;
}
public static ApplicationContext getAppContext(){
return null!=instance.applicationContext?instance.applicationContext :null;
}
@Override
public void setApplicationContext(ApplicationCont