================== Spring AOP框架部署 ================== 1 添加依赖 org.springframework spring-context 5.2.13.RELEASE org.springframework spring-aspects 5.2.13.RELEASE 2 配置文件 在/src/main/resources目录下创建applicationContext.xml文件: 保存为模板。 添加Bean: 3 测试 public class SpringAOPTest { public static void main(String[] args) { ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml"); BookDao bookDao = context.getBean("bookDao", BookDao.class); bookDao.insert(); bookDao.modify(); bookDao.delete(); } } 在t_book表中插入一条记录 修改t_book表中的一条记录 在t_book表中删除一条记录 没有事务管理。 例程:SpringAOP