Search code examples
javaormmybatisibatis

Is there any framework to pass from Ibatis to mybatis ? or anything to reduce programming time


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.


Solution

  • 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.