2 qq 36099669 qq_36099669 于 2017.01.11 10:07 提问

spring升级到4.x后,orm包里面移除了对ibatis的支持,这是为什么

spring升级到4.x后,orm包里面移除了对ibatis的支持,这是为什么

2个回答

engchina
engchina   Rxr 2017.01.11 15:40
已采纳

Basically you just have to add this dependency to your project:

<dependency>
    <groupId>org.mybatis</groupId>
    <artifactId>mybatis-2-spring</artifactId>
    <version>1.0.1</version>
</dependency>

Here are detail explanations.

Spring 4 got you down with no ibatis support - no worries Mybatis has your back
Spring is well on it's way to leaving 3 behind.  For ibatis users that for one reason or another are stuck to ibatis, but want to just make the jump to spring 4, there is a dilemma.  This dilemma roots in the fact that spring team dropped ibatis in spring 4.  Until now this meant that upgrading to spring 4 required upgrading ibatis to mybatis and mybatis-spring.  Well in order to mitigate risk to those that need it, mybatis team has decided to extract the spring 3 ibatis support into a new mybatis project called 'mybatis-2-spring'.  Better still, we go one step further and have released a fresh copy of 'mybatis-2'.  So there you have it, all of the users out there dealing with legacy code, mybatis is no longer directly tied into the mix resulting in higher risk in upgrading.  With that said, enjoy what's left in the ibatis land as we resurrect the past.

refer url:http://stackoverflow.com/questions/32353286/no-support-for-ibatis-in-spring4-2-0

wangb_java
wangb_java   2017.01.11 12:02

ibatis过时了,最新版本是mybatis

qq_36099669
qq_36099669 好的谢谢
11 个月之前 回复
wangb_java
wangb_java 回复qq_36099669: 向下兼容的对象是spring3,和ibatis没关系
11 个月之前 回复
wangb_java
wangb_java 回复qq_36099669: 向下兼容是指主要架构不变,大部分配置不变,不是指所有老旧东西全部保留
11 个月之前 回复
qq_36099669
qq_36099669 不应该是向下兼容吗 为什么移除掉了
11 个月之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!