[Spring学习]------Spring容器初探

Spring容器相关。目前在了解Spring的容器的相关信息之后,觉得在这部分初期阶段其实不需要知道Spring容器内部实现,只需要对Spring容器有一个整体的认识就可

什么是Spring容器?

  • 这个是国外一个教程对Spring容器的一个定义(个人认为讲得非常精简):The Spring container is at the core of the Spring Framework. The container will create the objects, wire them together, configure them, and manage their complete life cycle from creation till destruction. The Spring container uses DI to manage the components that make up an application. 接下来对它的描述进行拆解
    1. Spring容器是Spring framework的核心
    2. Spring容器创建了spring bean、并将这些spring bean进行关联,同时根据配置spring-bean进行扩展。
    3. Spring容器管理了spring bean创建到销毁的整个过程
    4. Spring容器采用了依赖注入的方式来管理spring bean

Spring容器分类

  • 现有的Spring只有两类容器
    • Spring BeanFactory Container
      1. 由org.springframework.beans.factory.BeanFactory接口定义
      2. 提供了最基础的依赖注入的功能
      3. 存在与spring-beans模块当中
    • Spring ApplicationContext Container
      1. 由org.springframework.context.ApplicationContext interface定义
      2. 相比较于BeanFactory,ApplicationContext提供了更强大的功能,例如event listeners

相关文章

tutorialspoint-Spring容器讲解
howtodoinjava-Spring容器讲解

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值