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.