void print() { DIFactory.Init(); //全局注册所有组件 DIFactory.InjectFromObject(this); //拦截当前对象,并注入 logger.Info("ioc组件化和缓存拦截器"); logger.Debug("logger is start."); flyObj.step1(); flyObjChina.step1(); }