在Spring中,“按名称自动装配”是指,如果一个bean的名称与其他bean属性的名称是一样的,那么将自动装配它. 例如,如果“customer” bean公开一个“address”属性,Spring会找到“address” bean在当前容器中,并自动装配.如果没有匹配找到,那么什么也不做. package auto_byname; /** * Created by luozhitao on 2017/8/8. */ public class Customer { public Addr…
AutowireCapableBeanFactory 根据名称:自动装配的BeanFactory,其实也是对BeanFactory的增强 源代码: /* * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in complian…