![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
spring
十秒耿直拆包选手
这个作者很懒,什么都没留下…
展开
-
spring:BeanFactory与ApplicationContext的联系及区别
原创 2024-08-03 19:31:37 · 17 阅读 · 0 评论 -
spring:xml定义bean
文件中定义了2个bean,一个是“com.itheima.dao.impl.UserDaoImpl”,通过字段id“userDao”调用;一个是“com.itheima.service.impl.UserServiceImpl”,通过字段id“userService”调用。spring有两种方法定义bean,一种是使用xml标签,一种是注解。我的文件目录如上图所示,在这里创建了bean.xml文件,bean.xml文件中定义了bean。使用方法getBean,通过bean的字段id获取实例对象。原创 2024-07-29 14:07:06 · 137 阅读 · 0 评论 -
spring:bean依赖注入方式
原创 2024-08-03 17:05:27 · 22 阅读 · 0 评论 -
spring:bean的方法init-method和方法destroy-method
方法init-method和方法destroy-method是spring框架的特性,这是绑定方法init-method在类的构造函数调用后被调用。通过名称分析方法destroy-method应该是该对象在销毁前被调用。原创 2024-08-03 16:10:08 · 69 阅读 · 0 评论