• 2023-12-23Spring的Bean后置处理器之AnnotationAwareAspectJAutoProxyCreator
    本文能帮你回答以下几个问题;AnnotationAwareAspectJAutoProxyCreator后置器的作用是什么?SpringAOP自动增强bean是如何实现的。如何在spring上下文添加AnnotationAwareAspectJAutoProxyCreator?如何利用ProxyFactory硬编码实现一个bean的增强?AnnotationAwareAspectJAutoProx
  • 2023-11-05Spring 冷知识:一个提前 AOP 的机会
    今天再来聊一个Spring中的冷门知识:Bean的处理不走正常流程,而是提前进行AOP。本文算是前面文章(SpringBean名称暗藏玄机,这样取名就不会被代理)内容的一个补充,如果还没阅读前文,建议先阅读,这样有利于更好的理解本文。1.Bean创建流程前面文章中,松哥和大家梳理了,在Bean创建的过
  • 2023-10-29Spring Bean 名称暗藏玄机,这样取名就不会被代理
    一些使用小细节就是在不断的源码探索中逐步发现的,今天就来和小伙伴们聊一下通过beanName的设置,可以让一个bean拒绝被代理!1.代码实践假设我有如下一个切面:@Aspect@EnableAspectJAutoProxy@ComponentpublicclassLogAspect{@Pointcut("execution(*org.javaboy.demo.s
  • 2023-02-20【Spring AOP】【五】Spring AOP源码解析-筛选编排合适的通知器
    1 前言我们了解过AOP配置解析以及AOP的切入时机,那么这篇我们看看,AOP是如何给某个Bean筛选合适的通知器。2 源码分析2.1 方法通读我们从AOP切入时机中,为当前bean
  • 2022-08-27Spring Bean工具类
    SpringUtils工具类importcn.caijiajia.framework.util.EnvUtil;importorg.springframework.beans.BeansException;importorg.springframework.context.ApplicationCo
  • 2022-08-27JavaBean属性赋值
    JavaBeanUtils工具类importlombok.experimental.UtilityClass;importlombok.extern.slf4j.Slf4j;importorg.springframework.beans.BeanUtils;importorg.springfr