IoC容器装配Bean(xml配置方式)(Bean的生命周期)
1、Spring管理Bean,实例化Bean对象 三种方式
第一种:使用类构造器实例化(默认无参数)
package cn.itcast.spring.initbean; /**
* 使用构造方法 实例化
*
* @author seawind
*
*/
public class Bean1 { } <!-- Bean 实例化第一种 方式 构造器 -->
<bean id="bean1" class="cn.itcast.spring.initbean.Bean1"></bean>
第二种:使用静态工厂方法实例化(简单工厂模式)
package cn.itcast.spring.initbean;
/**
* 使用静态工厂方法进行Bean 实例化
*
* @author seawind
*
*/
public class Bean2 { } package cn.itcast.spring.initbean;
// 工厂类
public class Bean2Factory {
public static Bean2 getBean2() {
return new Bean2();
}
} <!-- Bean 实例化第二种 方式 静态工厂方法 -->
<bean id="bean2" class="cn.itcast.spring.initbean.Bean2Factory" factory-method="getBean2" />
第三种:使用实力工厂方法实例化(工厂方法模式)
package cn.itcast.spring.initbean;
/**
* 通过实例 工厂方法进行构造
*
* @author seawind
*
*/
public class Bean3 { } package cn.itcast.spring.initbean;
public class Bean3Factory {
public Bean3 getBean3() {
return new Bean3();
}
} <!-- Bean 实例化 第三种 方式 实例工厂方法 -->
<bean id="bean3factory" class="cn.itcast.spring.initbean.Bean3Factory"></bean>
<bean id="bean3" factory-bean="bean3factory" factory-method="getBean3"></bean>
测试三种方式
package cn.itcast.spring.initbean; import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext; /**
* 实例化 Bean 三种方式
*
* @author seawind
*
*/
public class SpringTest {
@Test
// 实例工厂方法 实例化 Bean
public void demo3() {
ApplicationContext applicationContext = new ClassPathXmlApplicationContext(
"applicationContext.xml");
Bean3 bean3 = (Bean3) applicationContext.getBean("bean3");
System.out.println(bean3);
} @Test
// 使用 静态工厂方法实例化Bean
public void demo2() {
ApplicationContext applicationContext = new ClassPathXmlApplicationContext(
"applicationContext.xml");
Bean2 bean2 = (Bean2) applicationContext.getBean("bean2");
System.out.println(bean2);
} @Test
// 使用Bean 的构造方法 实例化Bean
public void demo1() {
ApplicationContext applicationContext = new ClassPathXmlApplicationContext(
"applicationContext.xml");
// Bean1 bean1 = (Bean1) applicationContext.getBean("bean1");
// Spring3 集合 JDK5 泛型特性
Bean1 bean1 = applicationContext.getBean("bean1", Bean1.class); System.out.println(bean1);
}
}
2、Bean的id属性和name属性
在使用Spring 配置Bean
<bean id="helloService" class=".....HelloService" />
<bean name="helloService" class="....HelloSerivce" />
* 在配置Bean过程中 id 属性 和 name 属性 都行 ,都可以通过 applicationContext.getBean(id/name) 来获得一个Bean实例
配置id 必须唯一,通常不含有特殊字符, 比如以/开始,以数字开始
配置name 属性,不必须唯一, 可以含有特殊字符
* 为什么要有name属性 ?
比如 struts1 整合 spring 需要将 请求路径 配置到spring 中
<bean id="/login" class="..... UserAction" /> ------ 在早期Spring版本 是报错的
<bean name="/login" class="..... UserAction" /> ------ 以前整合都是这样写的
3、 Bean的作用域
在配置 <bean> 元素时, 通过 scope 属性 指定 Bean的作用域
singleton : 代表Bean 在整个Spring 容器环境中 是单例的
prototype : 多例 (原型模式) , 在一个Spring 容器中,每次使用Bean 都会返回一个新的实例
request : 相当于 构造对象,保存request数据范围 (request.setAttribute())
session : 相当于 构造对象,保存session数据范围 (session.setAttribute()) 以后再次使用,同一个Session无需构造
* 在实际开发中 只需要掌握 singleton 和 prototype 就可以了 ----- 默认值是 singleton
4、Bean 生命周期
在配置 <bean> 通过 init-method destroy-method 定义Bean的初始化 和 销毁的方法
applicationContext.xml: <bean id="product" class="cn.itcast.spring.lifecycle.Product" init-method="myinit" destroy-method="mydestroy"></bean> public class Product {
public Product() {
System.out.println("执行 Product的 构造 ...");
} public void myinit() {
System.out.println("Product对象初始化....");
} public void mydestroy() {
System.out.println("Product对象销毁....");
}
} @Test
// 配置 init-method 和 destroy-method 执行 bean 的初始化和销毁 方法
public void demo1() {
ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext(
"applicationContext.xml");
Product product = (Product) applicationContext.getBean("product");
System.out.println(product); // 如果销毁 Spring 手动 调用 close方法
applicationContext.close();
}
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAACoCAIAAAAZysEHAAAgAElEQVR4nO1dv68cx5F+kfgHnHdDAwIeIAEvcnIG7mBjRSZ0IiWOnB3MaNcyYMAis+sFdCB1Shh416Lg6OQ7mGJiGn4CD0oWFCRbII/w2VzZkp+YPAMSdk+UddIJkmUYe0HzlYpd3dXVPbM/3tvvwwSL2Zqu6uqerulvarp3Ppi9HT3e+9Pvbr/56ttvvRGcef21/dtvvvren35H59/5/a9ef23fH/4veYYLk0zwg6vwB2lXVERlgr+KjI/+RQVKt2QP3bDXX9t//LHd7/7Td7JVlq1T6qhA1+uv7V/72U9OP/GN559zqQJ1RwVX6aYGVyk+VDwWraDSo4Krol0iVWVj41p8ePvNV7919syFZ56W/ske53/4vUceeeTRR7/6+GO73zp75vabr/Izp5/4xrWf/URpL2PfsHhDNqWv1+OP7T766FcfeeSR8z/8XsPbgWSyjuLNbbmFUwVG+0bqTrnwzNP2AuV9oXRRvZy6EcDilp2KTo+jreMXP3/pu//0na985e/+8R/+/vnn3Du//9VS1b3z+189/5w7/8Pv0XHhmacvPPP0L37+0tpdcXwP71XdhxaZ1PGLn79E7fWvz/3z22+9Ic+st+5kzInpSNtzpyAArPN4/jn3+GO7/vAPdydVKQ4cx+7YhjsFAWCdh2WKejKU4sBx7I5tuFN2Ppi9/e47b/7Xm/+JAwcOHDi26tj5YPb23f+++eqNa8Hxy+s//fGPLv7HS+Pg/L//2+jHP7r4y+s/lZfIwyJcVOA2H4qj6nwYvSrV7suQwYEDx3qPnQ9mb//5/p/+96MPg+POnVtP9L556dK/BOcvXnz2id4379y5JS+Rh0W4qMBtPhRH1fkwelWq3ZchgwMHjvUeOx/M3v70//5nITCdTvf29pxzwXnn3N7e3nQ6lZdIcOHZbDYajZxAr9frdDr9fn8ymVjK3Fooni9qFP2qVLtzzOfz8XjsnBuPx/P5nM5PJhM6YykHAID1YlkB4PPPPz84OBgO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uEnX05Wsi+BFQqIl0MUkJLvtPZhHQEAAFaGZAAIRg1JVvA8k7YCgGdaojktRQEg9Z7AEgAo+YcTPvYAwLmXgEoir0rGRl5+jb2uyKaBKhTQNfHag/KCovlOax/WEQAAYGVIBoAsVaIPpk1YFH24t5cjD0sAIJlzl+/S2jv+r3OX7xLHpSglSop4HjpDX4QFJVtMLaKALFWmCh6v5J+gj633/gGAYw3rO4DSwbTJDEASGjIviMukdMlFkqXNMlOIk13KKK/8RQQUfV1FBAtdRSRMkLkkTSULFYfrf6USnxSyix+Wr/NWKYMAAABtYbMCAOXqKAFAyqR0yUWSpc0yU4iTXXUBgEYx+rqKCBa6ikiYIHNJmkoWVgeAVOKTQnbxw/J13iplEAAAoC2EAcCTFZSCEuUoApkoTRR8DMUPYhukjOdMpHZOVkgZiy5ZTiATzczxJfMz9EVYURZQijg6d/luaoHoK+xLrtSHYPRdG/8ryImKJj4Fi0hzt8gP5Wiczcb71cggAABAW8gsBRFNC0llkUth+TmSLuOf++jMJZE4r8hYdEnj+eWWp06iblJpM7I6XxNzAlmv6HrOQZKVDADKN2syiUg3ww+m9z/+IrU6KWYAAHDykFkMLvpiMPUdqRSWnyPpMp57oTNcOGCHpYxFlzSeX27hnYm6SaXNyOp8TbwVkPWKruccJFnJAKB8syaTiHQz/GD68s33pRPwDgAATiqwHHTNwdOBLEfFSjtSRVSpJKmywlEzUuVs8oEAAAANgQCA47geCAAA0BAIADiO64EAAAANgQCA47geCAAA0BAPBQC5ZRUOHBt7+P1t1nv/AMCxxkMBQG5ZhQPHxh5+67T13j8AcKzxUAAAAAAAtgcIAAAAAFsKBAAAAIAtBQIAAADAlgIBAAAAYEuBAAAAALClQAAAAADYUiAAAAAAbCn+HzQzU3I0ti/bAAAAAElFTkSuQmCC" alt="" />
有构造方法,为什么要有init ?
java语言不建议在构造器 编写复杂处理逻辑,通常在构造器 只会成员变量赋值。初始化
完整Bean的生命周期
1) instantiate bean对象实例化
2) populate properties 封装属性(setXxxx方法执行)
3) 如果Bean实现BeanNameAware 执行 setBeanName(String beanName)
4) 如果Bean实现BeanFactoryAware 或者 ApplicationContextAware 设置工厂 setBeanFactory 或者上下文对象 setApplicationContext
* void setApplicationContext(ApplicationContext applicationContext)
5) 如果存在类实现 BeanPostProcessor(后处理Bean) ,执行postProcessBeforeInitialization
6) 如果Bean实现InitializingBean 执行 afterPropertiesSet
7) 调用<bean init-method="init"> 指定初始化方法 init
8) 如果存在类实现 BeanPostProcessor(处理Bean) ,执行postProcessAfterInitialization
9) 执行业务处理
10)如果Bean实现 DisposableBean 执行 destroy
11)调用<bean destroy-method="customerDestroy"> 指定销毁方法 customerDestroy
3) 4) 知识点: 让Bean 了解Spring 容器
5) Bean的后处理器 BeanPostProcessor ,该类成为Bean的后处理器
* 后处理Bean 可以对 已经创建 Bean对象 进行代理增强
package cn.itcast.spring.lifecycle; // 定义业务接口 public interface CustomerService {
public void addCustomer();
} package cn.itcast.spring.lifecycle; import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanNameAware;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware; // CustomerService 一个实现类
public class CustomerServiceImpl implements CustomerService, BeanNameAware,
ApplicationContextAware, InitializingBean, DisposableBean {
private String name; // 第一步
public CustomerServiceImpl() {
System.out.println("第一步 Bean的构造器执行....");
} @Override
public void addCustomer() {
// 第九步 执行业务操作
System.out.println("第九步 ,使用业务Bean 执行业务操作....");
System.out.println("添加客户");
} // 第二步
public void setName(String name) {
System.out.println("第二步 属性依赖注入....");
this.name = name;
} @Override
// 第三步,如果 Bean 实现 BeanNameAware, Spring 就会将 <bean> 配置 id 属性 、name 属性 注入
public void setBeanName(String beanName) {
System.out.println("第三步 获得当前Bean在Spring 注册 Bean 名字 :" + beanName);
} @Override
// 第四步 如果 Bean 实现 ApplicationContextAware, Spring 就会将Spring 应用上下文 注入给 Bean
public void setApplicationContext(ApplicationContext applicationContext)
throws BeansException {
System.out.println("第四步 获得当前 Spring上下文 :" + applicationContext);
// 通过该对象 操作其它Bean
} @Override
// 第六步
public void afterPropertiesSet() throws Exception {
System.out.println("第六步 属性封装完成 ....");
} // 第七步 通过配置文件,指定初始化方法
public void myinit() {
System.out.println("第七步 自定义初始化方法...");
} @Override
// 第十步 释放资源
public void destroy() throws Exception {
System.out.println("第十步, 不需要配置 调用释放资源方法");
} // 第十一步
public void mydestroy() {
System.out.println("第十一步 自定义 释放资源方法");
} } package cn.itcast.spring.lifecycle; import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy; import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor; // 自定义 一个 Bean的 后处理器 public class MyBeanPostProcessor implements BeanPostProcessor { @Override
// 提供两个方法,用户通过实现 两个方法,对原有Bean 进行增强
// 第八步
/**
* beanName 就是 配置文件 <bean> id 属性
* bean 增强前对象
*/
public Object postProcessAfterInitialization(final Object bean,
String beanName) throws BeansException {
System.out.println("第八步 BeanPostProcessor 后处理Bean 初始化完成后增强....");
// 通过beanName 判断要对哪个Bean 进行代理增强
if (beanName.equals("customerService")) {
// 增强
return Proxy.newProxyInstance(bean.getClass().getClassLoader(),
bean.getClass().getInterfaces(), new InvocationHandler() {
@Override
public Object invoke(Object proxy, Method method,
Object[] args) throws Throwable {
if (method.getName().equals("addCustomer")) { // 增强
System.out
.println("增强addCustomer=======================================");
} // 不增强
return method.invoke(bean, args);
}
});
}
return bean;
} @Override
// 第五步
public Object postProcessBeforeInitialization(Object bean, String beanName)
throws BeansException {
System.out.println("第五步BeanPostProcessor 后处理Bean 初始化完成前增强... ");
return bean;
} } @Test
// 通过CustomerService 来理解Bean 的生命周期
public void demo2() {
ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext(
"applicationContext.xml");
CustomerService customerService = (CustomerService) applicationContext
.getBean("customerService");
customerService.addCustomer(); applicationContext.close();
} <!-- 可以配置Bean 初始化和销毁 调用方法 -->
<bean id="customerService" class="cn.itcast.spring.lifecycle.CustomerServiceImpl" init-method="myinit" destroy-method="mydestroy">
<property name="name" value="张三"></property>
</bean> <!-- 配置后处理Bean ,不需要为Bean 指定id ,会对所有Bean 产生作用 -->
<bean class="cn.itcast.spring.lifecycle.MyBeanPostProcessor"></bean>
结果:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAABO4AAADtCAIAAACHwa1ZAAAgAElEQVR4nO3d2ZWjOhRAUeIiIOIhhBcFyTiJzsDvwzbWcCdJUGVcZ3/0cjNoBMFFuDz9+/fvv//++/fv379//+5fapqm+vP0YvzXSK1IM93R2EwrVVoALV8AAAAAwMP0F0JZAAAAAMA3IZQFAAAAAFwMoSwAAAAA4GIIZQEAAAAAF0MoCwAAAAC4GEJZAAAAAMDFEMoCAAAAAC5GDmXtX0DtzOmDfy41Ul/jF2KDS+7Vj8eKvyVrZ+RmAQAAAABfTw1ltYirNXzat3d23JapsmzN9ekQj0IjG9j1LdaKGwdD2XTf7t4BAAAAgCsSQtlIuNWQQUPEtS1p9Hpb52lebx15thWvLpU9WVqH3EaCdSLpQjuju97mhKwAAAAA/rLTvyvbEgnnoWz1/3ziNp+yva2ztvK527Il2+zr67hRXFLEn2IFjc8isWW0QFdMmYAWAAAAwN/kv2CsBVTRDLpD2XxW9rbOVYCqvoC8LdM0r8WCaU8tSbkOI8XC36tAt/hg7yuKxMBG64nhbl8fAQAAAMC1+LOyTTONxY62ao/y+7LJ68XlhK227Om2zlUom267znIoa3zQItViG6OywQaxi6SVp94GAAAAAL5V56xsMCprVMam6/yaXC3eH96949Xqz0aVoWyR8juUFYs9VXOwrdGmrUi/WDUloa+WI6EsAAAAgD/L/zGe8QCpDr2UNIVp1lfMaczA3oW3jYVZWTWUFUuVlrkOa8V6pfGnEdjXMbP937ps8SUAAAAA8JWaZ2Vb4yUtApRU8Woaom5LPtH6/MartOO2tMzK1kUVl9QztFooqyVitJ44ASsG0sHSvj2nq5W/BX3eWgA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LVdAM36I2sjScCAAAAAJcghLJaNBWf+msuhBLX2bvYM5bGBnXEaH82aloHnO4uWsWN9MVEghWMFwYAAAAAruKY78oeGMoO5hhMyt7MWFjHrsVnO6jW9nIzNWLUSKPFY10AAAAA+Hz+C8Y/MNd3RijbkXskcTEi1WLUu1S1Osot0q/3MtI3Stu6MQAAAABchT8rK8ZRRqzbNOPXnY67S1PKdqwobrknMknBZ/p5qsLRiGJfo03s2hk1BQAAAICLOnFWtimYbC5346ysm50bcEbCYHGzOuV4m4j7ulUzinRgFwAAAADAb/F/jCcS8IwHRZGYLZKjFmceVQsjItVytKsWCVMj4W6kIsSuAAAAAL5D86ysGA4NxkhGHGjsEilemmCkCm78bGRh12UklNXWBhd2NC8AAAAAfDLru7JidHd4KFtEa1qoGczRjeIiZTC22f/VQmgxRzdNLYjV/rVTFrOO7AgAAAAAl6CGsk0h0CFxUTCItXOsozh3utWeC23dODIre5cqq8XDRpDsNkKRjhZ+AwAAAMC1CKFsEeSIYVWZytisbEdYpcVm2qSouJldo2DQbrdVvdaurJiauJdYkqaWJJQFAAAAcFH+j/EAAAAAAPBRCGUBAAAAABdDKAsAAAAAuBhCWQAAAADAxRDKAgAAAAAuhlAWAAAAAHAxhLIAAAAAgIv55VB2nadpmub19vNZP9i/E9u3Pb/XCgAAAACn+h9ABI8zuN396AAAAABJRU5ErkJggg==" alt="" />
IoC容器装配Bean(xml配置方式)(Bean的生命周期)的更多相关文章
- Spring框架(2)---IOC装配Bean(xml配置方式)
IOC装配Bean (1)Spring框架Bean实例化的方式提供了三种方式实例化Bean 构造方法实例化(默认无参数,用的最多) 静态工厂实例化 实例工厂实例化 下面先写这三种方法的applicat ...
- 【spring源码学习】spring的IOC容器之自定义xml配置标签扩展namspaceHandler向IOC容器中注册bean
[spring以及第三方jar的案例]在spring中的aop相关配置的标签,线程池相关配置的标签,都是基于该种方式实现的.包括dubbo的配置标签都是基于该方式实现的.[一]原理 ===>sp ...
- spring Ioc容器之使用XML配置Bean
1.项目截图 2.创建xml文件 3.打印机接口 package com.example.demo.computerTest; public interface Printer { void init ...
- Spring3.2 中 Bean 定义之基于 XML 配置方式的源码解析
Spring3.2 中 Bean 定义之基于 XML 配置方式的源码解析 本文简要介绍了基于 Spring 的 web project 的启动流程,详细分析了 Spring 框架将开发人员基于 XML ...
- bean.xml配置数据源和读取配置文件配置数据源
一.bean.xml配置数据源 bean.xml装配bean,依赖注入其属性的时候,对应实体类中属性一定要有set方法, 二.读取配置文件配置数据源 1.配置文件 bean.xml配置: classp ...
- Bean XML 配置(4)- 自动装配
Spring 系列教程 Spring 框架介绍 Spring 框架模块 Spring开发环境搭建(Eclipse) 创建一个简单的Spring应用 Spring 控制反转容器(Inversion of ...
- Bean XML 配置(3)- 依赖注入配置
Spring 系列教程 Spring 框架介绍 Spring 框架模块 Spring开发环境搭建(Eclipse) 创建一个简单的Spring应用 Spring 控制反转容器(Inversion of ...
- Bean XML 配置(2)- Bean作用域与生命周期回调方法配置
系列教程 Spring 框架介绍 Spring 框架模块 Spring开发环境搭建(Eclipse) 创建一个简单的Spring应用 Spring 控制反转容器(Inversion of Contro ...
- Bean XML 配置(1)- 通过XML配置加载Bean
系列教程 Spring 框架介绍 Spring 框架模块 Spring开发环境搭建(Eclipse) 创建一个简单的Spring应用 Spring 控制反转容器(Inversion of Contro ...
- Spring IOC 容器源码分析 - 创建原始 bean 对象
1. 简介 本篇文章是上一篇文章(创建单例 bean 的过程)的延续.在上一篇文章中,我们从战略层面上领略了doCreateBean方法的全过程.本篇文章,我们就从战术的层面上,详细分析doCreat ...
随机推荐
- 小甲鱼PE详解之输入表(导入表)详解2(PE详解08)
在此之前,我们已经对这个输入表进行了一些实践和理解,这有助于大家对这个概念更进一步的加深认识.小甲鱼觉得,越是复杂的问题我们应该越是去动手操作它,认识它,这样才容易熟悉它! 在上一节课我们像小鹿一样的 ...
- eclipse提示信息设置和提示信息操作
1.提示信息设置 windows->preference->java->Editor->content Assist->Advance,选择需要提示的内容即可.如图所示: ...
- java.lang.NoClassDefFoundError: org/apache/avro/ipc/Responder
文章发自:http://www.cnblogs.com/hark0623/p/4170174.html 转发请注明 java.lang.NoClassDefFoundError: org/a ...
- JS一个根据时区输出时区时间的函数
做项目遇到的坑爹问题,需要根据时区获取时区中轴线的时间.为此搜了好久网上都没什么JS的代码描述到这一方面,最后自己翻了下高中地理才写了个函数出来. 此图可以看出来,全球分为了0时区,东西1-11区,第 ...
- Logback常用配置详解
logback是一套日志框架,由log4j的优化版,由同一个作者开发,在速度和性能上都超过其他日志框架,再结合slf4j,已成为当前最流行的日志框架. Logback最常用就是在classpath定义 ...
- 寒假D3 A Find the Lost Sock
Alice bought a lot of pairs of socks yesterday. But when she went home, she found that she has lost ...
- ZOJ2332 Gems(最大流)
题目大概说,alsomagic有宝石,宝石有颜色和形状两个属性:他有一种法力可以将某些颜色形状的宝石转化成另一种颜色形状的宝石:他的女朋友对各个颜色都有一定的容忍数量,而他自己也对各个形状都有一定的容 ...
- 1^b+2^b+3^b+...+n^b数列
首先,这是我自己推出来的,O(n^2),常数巨大.所以无能为力优化!所以求此数列的公式!求优化!!! 主要思想:要算b次的,那么就要先算b+1次的. 首先,我用F(i, j)表示杨辉三角第i层第j个, ...
- 【BZOJ】1067: [SCOI2007]降雨量(rmq+变态题)
http://www.lydsy.com/JudgeOnline/problem.php?id=1067 好不爽,弄了一个晚上. 好不爽. 还是照着别人程序拍着看的!!! 噗 这题很变态. 首先,我没 ...
- BestCoder Round #72
由于第一次打,只能在div2打.(这么好的机会还没AK真是丢人) T1 Clarke and chemistry 枚举题不解释(我不会告诉你我上来WA了四发的) T2 Clarke and point ...