![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Spring
文章平均质量分 78
ClarkKentYang
爱生活,爱米兰,爱Java
展开
-
Spring之事务管理(一)
一、核心jar包:spring-tx-4.0.0.RELEASE.jar下载地址:http://download.csdn.net/detail/clarkkentyang/9707932二、核心接口1.PlatformTransactionManager(平台事务管理器):管理事务的核心接口。需要导入jar包:spring-jdbc-4.0.0.RELEASE原创 2016-12-11 13:30:27 · 345 阅读 · 0 评论 -
spring(三)
IOC容器可以管理Bean的生命周期方法:1.创建Bean实例2.为Bean中的属性设置值和对其他Bean的引用postProcessAfterInitialization3.调用Bean的初始化方法(Bean中声明init-method)postProcessBeforeInitialization4.Bean的相关操作5.容器关闭执行Bean的销毁方法(Be原创 2016-09-07 21:02:48 · 405 阅读 · 0 评论 -
Spring(二)
配置Bean中属性的方法:1.属性注入:2.构造器注入: --> --> ]]> --> 构造器注入中,如果有对其他对象的引用,可以使用ref标签 clark 22 或者使用内部bean clark 22原创 2016-08-28 17:58:29 · 445 阅读 · 0 评论 -
spring(七)ssh2框架搭建
1.导入相关jar包:已经整理,这里不做介绍,提供下载地址 点击打开链接 http://download.csdn.net/detail/clarkkentyang/98793542.添加spring配置文件applicationContext.xml<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xml原创 2017-06-26 20:43:38 · 360 阅读 · 0 评论 -
Spring(六)spring之事务管理
通过给账户赠送积分的例子引入事务的话题:未使用事务:账户加减积分Dao:public interface AccountDao { void upScore(int score,int id); void downScore(int score,int id);}账户加减积分实现类:public class AccountDaoImpl extends Jd原创 2017-06-22 09:50:19 · 253 阅读 · 0 评论 -
Spring(五)spring整合jdbc
spring中整合了通过jdbc操作数据库:User类:public class User { private int sid; private Date bithday; private String gender; private String name; @Override public String toString() { return "原创 2017-06-19 22:24:18 · 247 阅读 · 0 评论 -
spring(一)helloworld
Spring概述:1.轻量级:非侵入性的。对象可以不依赖于Spring的API2.依赖注入:3.AOP面向切面编程4.容器:包含并且管理应用对象的生命周期5.框架:6.一站式:可以整合其他框架Spring模块HelloWorld:1.导入jar包:2.HelloWorld类:public class HelloWorld {原创 2016-08-27 22:47:44 · 594 阅读 · 0 评论 -
面试之Spring相关
1.Spring是什么?Spring是开源框架,是IOC和AOP容器框架。特点: a.轻量级,非侵入性的。不需要继承或实现接口就可以使用spring的相关方法b.依赖注入c.面向切面编程d.Spring是一个容器,他包含并管理应用对象的生命周期e.一站式,整合其他开源框架和第三方类库原创 2016-09-06 20:10:54 · 291 阅读 · 0 评论 -
spring(四)AOP相关概念
AOP定义:面向切面编程AOP实现原理:1.动态代理:被代理对象必须要实现接口2.CGLib代理:可以对任何类生成代理,代理的原理是对目标对象进行继承代理原创 2017-06-17 14:05:32 · 264 阅读 · 0 评论