spring
davidwang456
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
spring启动过程之源码跟踪(小结bean的生命周期)--spring Debug
spring in action1.容器发现bean的定义,初始化bean2.使用依赖注入的方式,spring根据bean定义,设置bean的所有属性3.如果bean继承了BeanNameAware接口,则工厂调用setBeanName方法,把bean的Id传值过去4.如果bean继承了BeanFactoryAware接口,则工厂调用setBeanFactroy()方法,把本身原创 2013-08-02 11:31:08 · 975 阅读 · 0 评论 -
spring调用存储过程
1.继承StoredProcedureorg.springframework.jdbc.object.StoredProcedure是对应存储过程调用的操作对象,它通过其父类org.springframework.jdbc.object.SqlCall获得相应的底层API支持(CallableStatementCreator), 然后在此基础之上构建了调用存储过程的执行方法。2、重原创 2013-08-02 11:30:40 · 659 阅读 · 0 评论 -
spring事务模板使用
1.配置spring事务模板bean class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"> ***** 2.事务服务bea原创 2013-08-02 11:30:36 · 648 阅读 · 0 评论 -
spring定时器分析
spring定时器如何使用?步骤1. 定义job bean 1.TaskScheduler构造 2.初始化相关服务 步骤2. 定义一个joblist bean来统一管理job原创 2013-08-02 11:30:33 · 612 阅读 · 0 评论 -
spring resource
1.resource的前生后世 前生:public interface Resource extends InputStreamSourcepublic interface InputStreamSource { /** * Return an {@link InputStream}. * It is expected that each cal原创 2013-08-02 11:31:32 · 548 阅读 · 0 评论 -
spring aop实现过程之三Spring AOP中Aspect编织的实现
1.上节我们谈到拦截器起作用时,实现代码(ReflectiveMethodInvocation.java)如下: public Object proceed() throws Throwable { // We start with an index of -1 and increment early. if (this.currentInt原创 2013-08-02 11:31:27 · 590 阅读 · 0 评论 -
spring aop实现过程之二Spring AOP中拦截器链
1.开始步骤--获取AopProxy主流程ProxyCreatorSupport.java /** * Subclasses should call this to get a new AOP proxy. They should not * create an AOP proxy with this as an argument. */原创 2013-08-02 11:31:25 · 479 阅读 · 0 评论 -
spring aop实现过程之一代理对象的生成
AOP实现中,可以看到三个主要的步骤,一个是代理对象的生成,然后是拦截器的作用,然后是Aspect编织的实现。 1.ProxyFactoryBean生成AopProxyProxyFactoryBean生成AOP proxy 1 /** 2 * Return a proxy. Invoked when clients obtain beans from th原创 2013-08-02 11:31:22 · 535 阅读 · 0 评论 -
Aop获取bean的过程---spring debug
1.调试程序:IStudent person = (IStudent)ctx.getBean("student");2.AbstractApplicationContext.java 执行 //--------------------------------------------------------------------- // Implementa原创 2013-08-02 11:31:15 · 732 阅读 · 0 评论 -
spring aop小结(概念解析)
1.advisor 1 /** 2 * Base interface holding AOP advice (action to take at a joinpoint) 3 * and a filter determining the applicability of the advice (such as 4 * a pointcut). This interfa原创 2013-08-02 11:31:13 · 566 阅读 · 0 评论 -
spring启动过程之源码跟踪(续beanfactory)--spring Debug
1.初始化过程1 Resource res = new ClassPathResource("/applicationContext.xml"); 2 XmlBeanFactory factory = new XmlBeanFactory(res); 2.入门 1 /** 2 * Create a new XmlBe原创 2013-08-02 11:31:05 · 438 阅读 · 0 评论 -
spring启动过程之源码跟踪(中)--spring Debug
上节我们debug到1 // Tell the subclass to refresh the internal bean factory.2 ConfigurableListableBeanFactory beanFactory = obtainFreshBeanFactory();我们继续debug 下一步:配置beanfactory的上下文 1 /**原创 2013-08-02 11:30:58 · 532 阅读 · 0 评论 -
spring启动过程之源码跟踪(上)--spring Debug
1,初始化容器1 ClassPathXmlApplicationContext context=new2 ClassPathXmlApplicationContext("/applicationContext.xml"); 步骤1:构造方法如下:1 public ClassPathXmlApplicationContext(Strin原创 2013-08-02 11:30:56 · 1034 阅读 · 0 评论 -
spring启动过程之源码跟踪(下)--spring Debug
在web应用启动入口是ContextLoaderListener,它是怎么完成启动过程的呢?首先:public class ContextLoaderListenerextends Object implements ServletContextListener//Bootstrap listener to start up Spring's root WebApplicati原创 2013-08-02 11:31:03 · 483 阅读 · 0 评论
分享