Spring入门——(三、Bean)

1、Spring的Bean配置

2、Bean容器初始化
基础:两个包
- org.springframework.beans
- org.springframework.context
- BeanFactory提供配置结构和基本功能,加载并初始化bean
- ApplicationContext保存了Bean对象并在Spring中被广泛使用
方式:ApplicationContext
- 本地文件(绝对路径)
- Classpath (项目中的相对路径)
- Web应用中依赖servlet或Listener


猜你喜欢

转载自blog.csdn.net/ghostxbh/article/details/80916395