问题描述
我尝试将mybatis-spring 1.2.2与mybatis 3.2.5和Spring版本4.1.0.Release一起发行,它似乎不受支持.
I tried mybatis-spring 1.2.2 with mybatis 3.2.5 and Spring version 4.1.0.Release and it appears like it is not supported.
mybatis-spring 1.2.2弹簧包含org.springframework.core.MethodParameter
类,但是,不存在getContainingClass()
.
mybatis-spring 1.2.2 spring contains org.springframework.core.MethodParameter
class however, getContainingClass()
is not present.
我得到了例外:java.lang.NoSuchMethodError: org.springframework.core.MethodParameter.getContainingClass()
有人知道我可以在Spring 4x上完全使用Mybatis吗? (甚至不支持ibatis)
Any idea is I could use Mybatis with Spring 4x at all? (even ibatis seems to be unsupported)
推荐答案
查看Spring MyBatis的pom.xml
此处我可以看到项目本身依赖于Spring 3.2.9:
Looking in the pom.xml
of the Spring MyBatis here I can see that the project itself depends on Spring 3.2.9:
...
<spring.version>3.2.9.RELEASE</spring.version>
...
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
<scope>provided</scope>
</dependency>
因此,基于这一点,如果我遇到像您在我的项目中遇到的异常,我也不会感到惊讶,我不得不说不",它不受支持.
So, based on that I wouldn't be surprised if I would get an exception like the one you are getting in my project and I would have to say that "no", it's not supported.
这篇关于Spring 4.x是否支持Mybatis?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!