logo Book
  • 关于
  • 标签
  • 分类
  • 读书笔记
    • 人性的枷锁
    • 酒国
  • 消息队列
    • kafka
    • rocketmq
    • rabbitmq
    • redis
  • Spring
    • 控制反转(IOC)/依赖注入(DI)
    • ApplicationContext 容器
    • SSM 框架整合
    • Spring Boot
      • 应用上下文配置类(ConfigurableApplicationContext)
        • 核心注解(@SpringBootApplication)
          • 自动配置类加载(@EnableAutoConfiguration)
            • 自动导入包(@AutoConfigurationPackage)
              • 类导入(@Import)
              • 条件导入(@Conditional)
      • 全局配置(application.properties)
        • 多环境配置切换
        • 属性加密
        • 日志配置
        • 属性松散绑定规则
      • 全局配置属性注入
        • 逐个注入(@Value)
        • 批量注入(@ConfigurationProperties @EnableConfigurationProperties)
      • 请求拦截(HandlerInterceptor & Filter & @WebFilter)
      • 前后端数据交互对接
        • 全局响应体处理器(ResponseBodyAdvice)
          • 取消封装
          • 响应体空值处理
        • 全局异常处理类
    • 事务
      • TransactionManager 事务管理器
        • 事务属性
        • 事务状态
      • 声明式事务(xml & 注解)
        • 配置xml方式
          • 创建事务管理器
        • 使用注解方式(@Transactional)
          • 环绕通知使用事务(@Around)
      • 编程式事务(TransactionTemplate & PlatformTransactionManager)
  • 面试题
    • 1.Java基础面试题
    • 2.Spring 面试题
    • 3.数据库面试题
    • 4.中间件面试题
    • 5.运维面试题
    • 6.场景题
    • 7.算法题
  • 大语言模型
  • 运维
  • 软件测评
  • 开源测评
  • 系统设计最佳实践
  • QA
    • 安装部署

环绕通知使用事务(@Around)

环绕通知可以在目标方法的前和后都能增强功能,不需要修改代码代码 ​​​​​​​ spring给业务方法在执行时,增加上事务的切面功能,在添加环绕事务方法 示例 @Pointcut("@annotation(com.exi.dao.Permissions)") ...
2022-11-28 Spring

©2022-2024 David | pv | uv
Theme Node-Tree Powered by Hexo