Type interface is not known to the MapperRegistry????

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Type interface is not known to the MapperRegistry????

KW9W4
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 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.