i'm looking for a simple way to move from Ibatis to myBatis, with some framework or anything that speed up my programming time. I'm migrating some software, and i need to do it quickly. Thanks in advance.
-
These are one in the same, but based on what I understand this migration you're wanting to do, is moving you in the wrong direction. Hopefully [this](https://stackoverflow.com/questions/28535900/difference-between-ibatis-and-mybatis?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa) post can help clarify what I mean. – Jacob May 02 '18 at 13:29
-
My bad, is as you said, from ibatis to mybatis – David Arellano May 02 '18 at 13:41
-
Is this a maven build, and which versions of ibatis are you using? Do you have any other specific details? – Jacob May 02 '18 at 14:00
-
i´m using ibatis 2.3, is not a maven build. the target is to use mybatis 3 – David Arellano May 02 '18 at 14:28
1 Answers
There is a project that attempts some of the simpler conversions of the XML through XSLT: https://github.com/mybatis/ibatis2mybatis
One thing that will be difficult is that the dynamic SQL tags have changed significantly - so there will be some manual work involved if you make use of them.
The Java side of things have changed too - moving away from DAO objects and towards Mapper interfaces. But those changes should be relatively straight forward.
Another area to look at is related to dependency injection and transaction management. If you were using the older Spring support for iBatis you will need to migrate to the newer Spring support maintained by the MyBatis team. If you were doing manual transaction management you will need to migrate that also.
So there is no simple answer here unfortunately. But it is not too difficult - with the exception of the dynamic SQL tags.

- 991
- 6
- 11