MyBatis - ResultHandler is not invoked

后端 未结 2 1262
长情又很酷
长情又很酷 2021-01-07 14:39

I followed this example : https://code.google.com/p/mybatis/wiki/ResultHandlerExample This is my interface:

public interface CountryDirRdbMapper {
    publi         


        
2条回答
  •  清酒与你
    2021-01-07 14:44

    I found the answer. Unfortunately MyBatis developers don't care about users at all. Shame on them. The truth is when we use custom result handlers we must use not interface but session.

    MyResultHandler handler=new MyResultHandler();
    session.select("select", handler);
    

    After that the result must be taken from handler.

提交回复
热议问题