java - Problems in using mybatis mapper interface -


i in using mybatis 3.2.2, , mapper interface extends base interface, code this: base interface:

public interface basemapper<t>{    public int insert(t record);    public int insertselective(t record); }  public interface jobmapper extends basemapper<job>{ } 

then test inert method,

jobmapper.insert(job); 

the error :

java.lang.nosuchmethoderror: com.xxx.framework.dao.ifaces.jobmapper.insert(lcom/xxx/framework/model/job;)i 

but if this:

public interface basemapper{    public int insert(job record);    public int insertselective(job  record); }  public interface jobmapper  extends basemapper{ } 

the result correct.

i want use generic base interface implements common method, add,update,delete etc. can tell me ?

i have working example of generic base interfaces in 1 of projects possible proper mybatis configuration. hard tell what's wrong in situation didn't attach mybatis configs.

i think try add type aliases package configuration (if don't have it) solve issue:

<typealiases>     <package name="com.xxx.framework.model"/> </typealiases> 

see the documentation.


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -