Spring
Spring
我们都有光明的未来@
这个作者很懒,什么都没留下…
展开
-
Bean的三种初始化方式和两种注入方式!!!
首先,bean的初始化方式有三种官方文档1.3.2节,初始化bean三种方式分别是通过构造器初始化,通过静态工厂初始化,通过实例化工厂初始化其次,bean的注入方式只两种官方文档1.4.1依赖注入章节下通过构造器注入和通过set方法注入我找第三种依赖注入方法找了几十篇文章,原来它根本就不存在!!!...原创 2021-03-18 16:58:03 · 462 阅读 · 0 评论 -
探究Spring-----Bean的生命周期
new ClassPathXmlApplicationContext("applicationContext.xml"); /** * Create a new ClassPathXmlApplicationContext with the given parent, * loading the definitions from the given XML files. * @param configLocations array of resource locations * @par原创 2021-03-17 21:25:05 · 100 阅读 · 0 评论