今天配置spring 是碰到tx:annotation-driven is not bound 的问题,这个错误的原因很简单是:
我们在定义申明AOP的时候。。没有加载schema。
具体表现如下:
<tx:annotation-driven transaction-manager=“txManager” />
这时会抛出异常不认标签。。起先还以为是没有加载JAR包呢。。
后来读AOP文档才发现中要加入“xmlns:aop”的命名申明,并在“xsi:schemaLocation”中指定aop配置的schema的地址
配置文件如下:
<?xml version="1.0" encoding="UTF-8"?>这些才是最关键的地方。。后面的配置不变。。。。