Facing deprecated issue after migrating iBatis to MyBatis into spring 4

1.1k Views Asked by At

When i migrate spring 3 to spring 4, iBatis is no longer support for spring 4. After google, i have added dependency 'mybatis-2-spring' into pox.xml but extended class 'SqlMapClientDaoSupport' class is deprecated. So could you please help is there any updated or upgraded class which is related to 'SqlMapClientDaoSupport' class that is used in MyBatis?

1

There are 1 best solutions below

0
ave On

If you want to use iBATIS 2.x with Spring 4+, adding mybatis-2-spring to the dependencies list is the right solution.
SqlMapClientDaoSupport is still deprecated, but it should work fine.

If you want to remove the warnings, just add @SuppressWarnings("deprecation") to your DAOs.

@SuppressWarnings("deprecation")
public class YourDao extends SqlMapClientDaoSupport {

Hope you find the time to upgrade to the latest version of MyBatis (3.5.3 at the moment) soon. :)