### Error building SqlSession.在線等 求指教?。?!
### Error building SqlSession.
### The error may exist in sqlconfig/Massage.xml
### The error occurred while processing mapper_resultMap[MessageResult]
### Error building SqlSession.
### The error may exist in sqlconfig/Massage.xml
### The error occurred while processing mapper_resultMap[MessageResult]
2017-09-15
舉報
2018-12-05
我和你遇到了一樣的錯誤,不過我的Message.xml是完整的,處了我們自己定義的select語句,這個xml文件后面還有幾個語句,其中有個屬性叫做parameterType=“userAlias”,但是我們在主配置文件中是吧這個設(shè)置別名給注釋掉了的,所以解決方法就是將這個屬性給刪除掉。
2017-09-16
你下載源碼了嗎?
2017-09-15
<?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">
<!-- namespace命名空間,為了對sql語句進行隔離,方便管理 ,mapper開發(fā)dao方式,使用namespace有特殊作用 -->
<mapper namespace="Message">
<resultMap type="bean.Message" id="MessageResult">
<id column="ID" jdbcType="INTEGER" property="id" />
<result column="COMMAND" javaType="VARCHAR" property="command" />
<result column="DESCRIPTION" javaType="VARCHAR" property="description" />
<result column="CONTENT" javaType="VARCHAR" property="content" />
</resultMap>
? <select id="queryMessageList"? resultMap="MessageResult">
??select ID ,COMMAND,DESCRIPTION,CONTENT from message where 1=1
?</select>
</mapper>