您的位置:首页 > 运维架构

cvc-complex-type.2.4.c: ...is strict, ...declaration found element"context:property-placeholder"

2017-10-13 21:43 363 查看
GitHub上的项目,导入两次。第一次把问题解决了,然后第二次有傻傻地给忘了,Mark一下

在pom.xml中加入ibatis依赖如下:

<dependency>

    <groupId>org.apache.ibatis</groupId>

    <artifactId>ibatis-core</artifactId>

    <version>3.0</version>
</dependency>

当然,在Stack Overflow上看到了类似错误,其原因与解决方法如下:

You have this:
xmlns:mvc="http://www.springframework.org/schema/mvc"


but you're not mentioning it here:
xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">


To fix that, you should have
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd


there as well, like
xsi:schemaLocation=" http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">


Note: it is actually common that schema references don't mention Spring version to allow for easier upgrading, so you could use references like 
http://www.springframework.org/schema/context/spring-context.xsd
 as
well.
源网址请戳:https://stackoverflow.com/questions/19218122/cvc-complex-type-2-4-c-the-matching-wildcard-is-strict-but-no-declaration-can
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  maven eclipse ibatis
相关文章推荐