摘要: 配置类 /** * 扩展原理: * BeanPostProcessor:bean后置处理器,bean创建对象初始化前后进行拦截工作的 * * 1、BeanFactoryPostProcessor:beanFactory的后置处理器; * 在BeanFactory标准初始化之后调用,来定制和修改Bea 阅读全文
posted @ 2020-12-24 20:22 aBiu-- 阅读(91) 评论(0) 推荐(0) 编辑
摘要: 声明式事务 写个配置类 /** * 声明式事务: * * 环境搭建: * 1、导入相关依赖 * 数据源、数据库驱动、Spring-jdbc模块 * 2、配置数据源、JdbcTemplate(Spring提供的简化数据库操作的工具)操作数据 * 3、给方法上标注 @Transactional 表示当前 阅读全文
posted @ 2020-12-24 19:48 aBiu-- 阅读(303) 评论(0) 推荐(0) 编辑
摘要: AOP功能测试 先看一下这个类: public class MathCalculator { public int div(int i,int j){ System.out.println("MathCalculator...div..."); return i/j; } } 在这段执行逻辑中,我们 阅读全文
posted @ 2020-12-24 14:37 aBiu-- 阅读(89) 评论(0) 推荐(0) 编辑