SpringAOP声明式事务控制:xml配置(spring提供的事务管理器)
文章目录 1. 创建 spring 的配置文件并导入约束 2. 编写业务层,持久层 3. 在配置文件中配置业务层和持久层对 4. spring中基于XML的声明式事务控制配置步骤 1. 创建 spring 的配置文件并导入约束 此处需要导入 aop 和 tx 两个名称空间 < ? xml version = "1.0" encoding = "UTF-8" ? > < beans xmlns = "http://www.springframework.org/schema/beans" xmlns : xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns : aop = "http://www.springframework.org/schema/aop" xmlns : tx = "http://www.springframework.org/schema/tx" xsi : schemaLocation = "http : / / www . springframework . org / schema / beans http : / / www . springframework . org / schema / beans / spring - beans . xsd http : / / www .