ssh配置applicationContext.xml时报错:
cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element ‘tx:advice’.
解决办法:
在xsi:schemaLocation
里添加:
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx.xsd
同时还需添加:
xmlns:tx="http://www.springframework.org/schema/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:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx.xsd"
xmlns:tx="http://www.springframework.org/schema/tx">
</beans>