MyEclipse报错:cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found

版权声明:本文为博主原创文章,转载请注明出处 https://blog.csdn.net/m0_37750720/article/details/82822911

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>

猜你喜欢

转载自blog.csdn.net/m0_37750720/article/details/82822911