1. 程式人生 > >萬用字元的匹配很全面, 但無法找到元素 'tx:annotation-driver' 的宣告

萬用字元的匹配很全面, 但無法找到元素 'tx:annotation-driver' 的宣告

主要原因是因為xsd定義檔案引用地址問題

這裡出錯主要在這個xsd檔案:xmlns:tx="http://www.springframework.org/schema/tx"
加入即可.
下面提供一個比較全的xsd檔案引用宣告

<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/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">