当前位置: 代码迷 >> 综合 >> 元素 'tx:advice' 中不允许出现属性 'transaction-manager'
  详细解决方案

元素 'tx:advice' 中不允许出现属性 'transaction-manager'

热度:17   发布时间:2024-01-12 17:50:07.0

元素 ‘tx:advice’ 中不允许出现属性 ‘transaction-manager’

IDEA自动生成的spring XML配置文件引用的xml约束不对,可以去官网找到了比较全面的bean引用的约束
在这里我提供一版

<?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:context="http://www.springframework.org/schema/context"xmlns:aop="http://www.springframework.org/schema/aop"xmlns:tx="http://www.springframework.org/schema/tx"xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.3.xsdhttp://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsdhttp://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.3.xsdhttp://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd">
</beans>

参考博客:
https://blog.csdn.net/weixin_38997311/article/details/79779000

  相关解决方案