tx:advice 元素未声明
我的 Spring.Net 配置出现了 element tx:advice notclarified 错误,我一生都无法弄清楚为什么。请帮忙!
我的配置如下:
<objects xmlns="http://www.springframework.net"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:tx="http://www.springframework.net/tx"
xmlns:db="http://www.springframework.net/database"
xsi:schemaLocation="http://www.springframework.net http://www.springframework.net/schema/objects/spring-objects.xsd
http://www.springframework.net/schema/tx
http://www.springframework.net/schema/tx/spring-tx.xsd
http://www.springframework.net/schema/db
http://www.springframework.net/schema/db/spring-database.xsd">
<!-- some config settings -->
<tx:advice id="txAdvice" transaction-manager="HibernateTransactionManager">
<tx:attributes>
<tx:method name="*" isolation="ReadUncommitted" />
</tx:attributes>
</tx:advice>
</objects>
I'm getting the element tx:advice not declared error for my Spring.Net configuration and for the life of me I can't figure out why. Please help !
My config looks like :
<objects xmlns="http://www.springframework.net"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:tx="http://www.springframework.net/tx"
xmlns:db="http://www.springframework.net/database"
xsi:schemaLocation="http://www.springframework.net http://www.springframework.net/schema/objects/spring-objects.xsd
http://www.springframework.net/schema/tx
http://www.springframework.net/schema/tx/spring-tx.xsd
http://www.springframework.net/schema/db
http://www.springframework.net/schema/db/spring-database.xsd">
<!-- some config settings -->
<tx:advice id="txAdvice" transaction-manager="HibernateTransactionManager">
<tx:attributes>
<tx:method name="*" isolation="ReadUncommitted" />
</tx:attributes>
</tx:advice>
</objects>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不要使用 xsi:schemaLocation="http://www.springframewo... 尝试在 Visual Studio 中安装 xsd 架构,如 在文档中。
Instead of using
xsi:schemaLocation="http://www.springframewo...
try installing the xsd schema's in Visual Studio as described in the docs.我缺少 TxNamespaceParser 的声明:
doh!
I was missing a declaration for the TxNamespaceParser :
doh!