认证0级讲师
This is the mechanism for assembling Beans. The second getBean(Class<> clzss)明显是按照类型 获取,比方说,你要提取的Bean的类型是com.abc.def.test.service.LoginService你只需要在这里给定参数是: getBean(com.abc.def.test.service.LoginService.class)就可以得到一个LoginService object instance
getBean(Class<> clzss)
com.abc.def.test.service.LoginService
getBean(com.abc.def.test.service.LoginService.class)
LoginService
BeanFactory has a Map from Class to bean_id
This is the mechanism for assembling Beans. The second
getBean(Class<> clzss)
明显是按照类型 获取,比方说,你要提取的Bean的类型是com.abc.def.test.service.LoginService
你只需要在这里给定参数是:
getBean(com.abc.def.test.service.LoginService.class)
就可以得到一个
LoginService
object instanceBeanFactory has a Map from Class to bean_id