2020年6月25日

摘要: Bean的生命周期 创建、初始化(赋初值)、使用、销毁。 方法一:@Bean+返回值方式 init destory <bean id="student" class="org.ghl.entity.Student" scope="singleton" init-method="myInit" des 阅读全文
posted @ 2020-06-25 15:05 若雨静夜 阅读(337) 评论(0) 推荐(0)
 
摘要: 开发基于注解形式的spring SpringIOC容器的2种形式: (1)xml配置文件:applicationContext.xml; 存bean:<bean> 取bean: ApplicationContext context=new ClassPathXmlApplicationContext 阅读全文
posted @ 2020-06-25 10:20 若雨静夜 阅读(548) 评论(0) 推荐(0)