自动装配

 

 按类型自动装配必须保证相同类型bean唯一,也就是bean中class不能重复

 

如果需要设置两个一样的bean则需要使用按名称装配(了解)

 

posted @ 2023-07-10 20:21  Karlshell  阅读(27)  评论(0)    收藏  举报