“Type interface is not known to the MapperRegistry” exception using mybatis

前端 未结 7 685
野性不改
野性不改 2021-02-02 15:23

I\'m setting up mybatis using annotations, and getting this helpful exception

org.apache.ibatis.binding.BindingException: Type interface org.foo.Bar is

7条回答
  •  清歌不尽
    2021-02-02 15:36

    In your mapper.xml file mapper's namespace should be the path to the mapper interface.

    for example:

    
    
    
    

    your mapper interface should be in com.mapper package and the name of it is LineMapper.

提交回复
热议问题