• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • YouClaw
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录

无信不立

  • 博客园
  • 联系
  • 订阅
  • 管理

公告

随笔分类 -  Spring

1 2 3 4 下一页

【spring源码学习】@Aspect 实现切面代码的原理
摘要:一、spring-boot框架中的应用 1、服务启动时,会加载spring-boot-autoconfigure的jar中spring.factories文件,加载服务启动自动装配的类 2、关于动态代理的装配类为 org.springframework.boot.autoconfigure.Enab 阅读全文

posted @ 2021-01-21 17:10 无信不立 阅读(998) 评论(0) 推荐(0)

【spring源码学习】spring如何完成IOC容器构建
摘要:一、整体思路 1、整体思路 第一步:获取RootBeanDefinition 第二步:获取该BeanDefinition的依赖,将依赖关系注入到DefaultSingletonBeanRegistry中的dependentBeanMap,dependenciesForBeanMap 第三步:遍历初始 阅读全文

posted @ 2020-02-09 16:39 无信不立 阅读(272) 评论(0) 推荐(0)

【spring源码学习】spring事务中的嵌套事务中的保存点相关知识
摘要:JDBC事务保存点(setSavepoint, releaseSavepoint )实例 以下是使用事务教程中描述的setSavepoint和回滚的代码示例。 此示例代码是基于前面章节中完成的环境和数据库设置编写的。 复制并将以下示例代码保存到:JDBCSavepoint.java 中,编译并运行如 阅读全文

posted @ 2019-11-28 19:58 无信不立 阅读(785) 评论(0) 推荐(0)

【spring源码学习】spring的事务管理源码学习
摘要:一、抽象概念 1、事务管理器 接口:org.springframework.transaction.PlatformTransactionManager 实现类:org.springframework.jdbc.datasource.DataSourceTransactionManager 2、事务 阅读全文

posted @ 2019-11-24 18:58 无信不立 阅读(303) 评论(0) 推荐(0)

【spring源码分析】IOC容器解析
摘要:参考: https://www.iteye.com/topic/1121913(自动注入bean的扫描器) https://m.imooc.com/mip/article/34150(循环依赖的解决方案) https://blog.csdn.net/why_2012_gogo/article/det 阅读全文

posted @ 2019-07-06 19:34 无信不立 阅读(196) 评论(0) 推荐(0)

【spring源码分析】@Value注解原理
摘要:class org.springframework.context.support.PropertySourcesPlaceholderConfigurer 该类实现了的接口:1、org.springframework.beans.factory.BeanNameAware setBeanName( 阅读全文

posted @ 2019-07-05 12:24 无信不立 阅读(916) 评论(0) 推荐(0)

【spring源码分析】spring关于循环依赖的问题
摘要:引言:循环依赖就是N个类中循环嵌套引用,如果在日常开发中我们用new 对象的方式发生这种循环依赖的话程序会在运行时一直循环调用,直至内存溢出报错。下面说一下Spring是如果解决循环依赖的。 第一种:构造器参数循环依赖 Spring容器会将每一个正在创建的Bean 标识符放在一个“当前创建Bean池 阅读全文

posted @ 2019-03-03 14:15 无信不立 阅读(539) 评论(0) 推荐(0)

【SpringCloud】初识springCloud
摘要:转载来源:https://maimai.cn/article/detail?fid=1149221357&efid=lL_Z3WzTyUDLAjQwrNrIsw 概述 毫无疑问,Spring Cloud是目前微服务架构领域的翘楚,无数的书籍博客都在讲解这个技术。不过大多数讲解还停留在对Spring 阅读全文

posted @ 2019-03-03 13:53 无信不立 阅读(272) 评论(0) 推荐(0)

【spring源码分析】BeanDefinitionRegistryPostProcessor解析
摘要:一、自定义BeanDefinitionRegistryPostProcessor BeanDefinitionRegistryPostProcessor继承自BeanFactoryPostProcessor,是一种比较特殊的BeanFactoryPostProcessor。BeanDefinitio 阅读全文

posted @ 2019-02-17 10:10 无信不立 阅读(1270) 评论(0) 推荐(0)

【spring源码分析】spring和@PostConstruct注解
摘要:@PostConstruct注解好多人以为是Spring提供的。其实是Java自己的注解。 Java中该注解的说明:@PostConstruct该注解被用来修饰一个非静态的void()方法。被@PostConstruct修饰的方法会在服务器加载Servlet的时候运行,并且只会被服务器执行一次。Po 阅读全文

posted @ 2019-02-14 17:49 无信不立 阅读(1307) 评论(0) 推荐(0)

【spring源码分析】spring ioc容器之前生今世--DefaultListableBeanFactory源码解读
摘要:1. DefaultListableBeanFactory的作用: 默认实现了ListableBeanFactory和BeanDefinitionRegistry接口,基于bean definition对象,是一个成熟的bean factroy。 最典型的应用是:在访问bean前,先注册所有的def 阅读全文

posted @ 2019-02-11 15:10 无信不立 阅读(421) 评论(0) 推荐(0)

【spring源码分析】BeanDefinitionRegistryPostProcessor接口可自定义bean加入IOC
摘要:自定义BeanDefinitionRegistryPostProcessor BeanDefinitionRegistryPostProcessor继承自BeanFactoryPostProcessor,是一种比较特殊的BeanFactoryPostProcessor。BeanDefinitionR 阅读全文

posted @ 2018-08-12 19:05 无信不立 阅读(2464) 评论(0) 推荐(0)

【spring源码分析】spring AspectJ的Execution表达式
摘要:在使用spring框架配置AOP的时候,不管是通过XML配置文件还是注解的方式都需要定义pointcut"切入点" 例如定义切入点表达式 execution (* com.sample.service.impl..*.*(..)) execution()是最常用的切点函数,其语法如下所示: 整个表达 阅读全文

posted @ 2018-06-26 18:02 无信不立 阅读(390) 评论(0) 推荐(0)

【spring源码分析】面向切面编程架构设计
摘要:2 注解说明 2.1 @Aspect 作用是把当前类标识为一个切面供容器读取 2.2 @Before标识一个前置增强方法,相当于BeforeAdvice的功能,相似功能的还有 2.3 @AfterReturning 后置增强,相当于AfterReturningAdvice,方法正常退出时执行 2.4 阅读全文

posted @ 2018-06-22 18:28 无信不立 阅读(286) 评论(0) 推荐(0)

【spring源码学习】Spring @PostConstruct和@PreDestroy实例
摘要:在Spring中,既可以实现 InitializingBean和DisposableBean接口或在bean配置文件中指定 init-method 和 destroy-method 在初始化和销毁回调函数。在这篇文章中,我们将介绍如何使用 @PostConstruct 和 @PreDestroy 注 阅读全文

posted @ 2018-02-24 16:51 无信不立 阅读(449) 评论(0) 推荐(0)

【spring源码学习】spring的task配置
摘要:spring线程池的配置策略含义 id:当配置多个executor时,被@Async("id")指定使用;也被作为线程名的前缀。 core size:最小的线程数,缺省:1 max size:最大的线程数,缺省:Integer.MAX_VALUE queue-capacity:当最小的线程数已经被占 阅读全文

posted @ 2017-11-24 20:45 无信不立

【spring源码学习】spring的aop目标对象中进行自我调用,且需要实施相应的事务定义的解决方案
摘要:转载:http://www.iteye.com/topic/1122740 1、预备知识 aop概念请参考【http://www.iteye.com/topic/1122401】和【http://jinnianshilongnian.iteye.com/blog/1418596】 spring的事务 阅读全文

posted @ 2017-10-12 15:22 无信不立 阅读(806) 评论(0) 推荐(1)

【spring源码学习】spring配置的事务方式是REQUIRED,但业务层抛出TransactionRequiredException异常问题
摘要:(1)spring抛出异常的点:org.springframework.orm.jpa.EntityManagerFactoryUtils public static DataAccessException convertJpaAccessExceptionIfPossible(RuntimeExc 阅读全文

posted @ 2017-09-13 17:39 无信不立 阅读(731) 评论(0) 推荐(0)

【spring源码学习】spring集成orm数据框架
摘要:【一】简易的数据源配置 (1)配置文件 <!--springJdbcTemplemate数据操作配置信息 --> <bean id="driver" class="com.mysql.jdbc.Driver"></bean> <bean id="dataSource" class="org.spri 阅读全文

posted @ 2017-08-24 15:54 无信不立 阅读(688) 评论(0) 推荐(0)

【spring源码学习】spring的事务管理的源码解析
摘要:【一】spring事务管理(1)spring的事务管理,是基于aop动态代理实现的。对目标对象生成代理对象,加入事务管理的核心拦截器==>org.springframework.transaction.interceptor.TransactionInterceptor。 >spring事务管理的核 阅读全文

posted @ 2017-08-07 13:11 无信不立 阅读(412) 评论(0) 推荐(0)

1 2 3 4 下一页
 
博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3