Announcement Announcement Module
Collapse
No announcement yet.
Mybatis: Type interface is not known to the MapperRegistry???? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Mybatis: Type interface is not known to the MapperRegistry????

    I don't know why when i running Spring + MyBatis 3.1, i got this message:
    "Caused by: org.apache.ibatis.binding.BindingException: Type interface MessageIdMap is not known to the MapperRegistry."
    I've already checked Interface, and every thing is normal, and the other same runs good.


    This is DAO:
    @Component("messageIdDAO")
    public class MessageIdDAOImpl extends SqlSessionDaoSupport implements
    MessageIdDAO, Serializable {

    private static final long serialVersionUID = 1L;

    @Override
    public List<MessageIdDTO> selectMessageIdList(
    String screenType) {
    List<MessageIdDTO> rtnValue = getSqlSession().getMapper(
    MessageIdMap.class).selectMessageIdList(
    screenType);
    return rtnValue;
    }
    }
    And this is Xml:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE mapper
    PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
    "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
    <mapper namespace="dao.map.MessageIdMap">

    <resultMap id="MResult" type="MessageIdDTO">
    <result column="MESSAGE_ID" property="messageId"/>
    </resultMap>

    <select id="selectAAA" resultMap="MResult">
    My SQL Select
    </select>

    </mapper>
    And here is my Mapper:

    public interface MessageIdMap {
    public List<MessageIdDTO> selectMessageIdList(
    String screenType);
    }
    Please help me why ? Thank in advance.
Working...
X