第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定

報錯`Message.xml中報錯`

http://img1.sycdn.imooc.com//589c0ff90001391309770229.jpg

錯誤內(nèi)容?Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'UserAlias'. ?Cause: java.lang.ClassNotFoundException: Cannot find class: UserAlias


<mapper namespace="Message">

? <!-- type對應的哪個實體類,id要在resultMap中唯一 ?-->

? <resultMap type="bean.Message" id="MessageResult">

? ? <!-- 數(shù)據(jù)庫中主鍵用ID標簽 ?-->

? ? <!-- column對應數(shù)據(jù)庫中的字段名,property對應了實體類中的屬性名 ,jdbcType對應了數(shù)據(jù)庫中的屬性類型-->

? ? <id column="ID" jdbcType="INTEGER" property="id"/>

? ? <!-- 數(shù)據(jù)庫中普通字段用result標簽 -->

? ? <result column="COMMAND" jdbcType="VARCHAR" property="command"/>

? ? <result column="DESCRIPTION" jdbcType="VARCHAR" property="description"/>

? ? <result column="CONTENT" jdbcType="VARCHAR" property="content"/>

? </resultMap>

?<!-- Mybatis中的配置信息,應用在一條具體的SQL語句上,通過resultMap標簽指向相對應的id名 ?-->

? <select id="queryMessageList" resultMap="MessageResult">

? ? select ID,COMMAND,DESCRIPTION,CONTENT from message where 1=1

? </select>


? <select id="version" parameterType="long" resultType="int">

? ? SELECT version FROM user WHERE id = #{id,jdbcType=INTEGER}

? </select>


? <delete id="delete" parameterType="UserAlias">

? ? DELETE FROM user WHERE id = #{id:INTEGER}

? </delete>


? <insert id="insert" parameterType="UserAlias" useGeneratedKeys="false">

? ? INSERT INTO user

? ? ( id,

? ? username,

? ? password,

? ? administrator

? ? )

? ? VALUES

? ? ( #{id},

? ? #{username,jdbcType=VARCHAR},

? ? #{password.encrypted:VARCHAR},

? ? #{administrator,jdbcType=BOOLEAN}

? ? )

? </insert>


? <update id="update" parameterType="UserAlias">

? ? UPDATE user SET

? ? username = #{username,jdbcType=VARCHAR},

? ? password = #{password.encrypted,jdbcType=VARCHAR},

? ? administrator = #{administrator,jdbcType=BOOLEAN}

? ? WHERE

? ? id = #{id,jdbcType=INTEGER}

? </update>


? <!-- ? Unique constraint check -->

? <select id="isUniqueUsername" parameterType="map" resultType="boolean">

? ? SELECT (count(*) = 0)

? ? FROM user

? ? WHERE ((#{userId,jdbcType=BIGINT} IS NOT NULL AND id != #{userId,jdbcType=BIGINT}) OR #{userId,jdbcType=BIGINT} IS

? ? NULL) ?<!-- other than me -->

? ? AND (username = #{username,jdbcType=VARCHAR})

? </select>

</mapper>



查看了下`是下面的刪除和插入等``parameterType="UserAlias"報找不到``如何處理?刪掉下面的SQL語句么?

正在回答

2 回答

把你的這個刪除就可以了!

<select id="version" parameterType="long" resultType="int">

? ? SELECT version FROM user WHERE id = #{id,jdbcType=INTEGER}

? </select>


? <delete id="delete" parameterType="UserAlias">

? ? DELETE FROM user WHERE id = #{id:INTEGER}

? </delete>


? <insert id="insert" parameterType="UserAlias" useGeneratedKeys="false">

? ? INSERT INTO user

? ? ( id,

? ? username,

? ? password,

? ? administrator

? ? )

? ? VALUES

? ? ( #{id},

? ? #{username,jdbcType=VARCHAR},

? ? #{password.encrypted:VARCHAR},

? ? #{administrator,jdbcType=BOOLEAN}

? ? )

? </insert>


? <update id="update" parameterType="UserAlias">

? ? UPDATE user SET

? ? username = #{username,jdbcType=VARCHAR},

? ? password = #{password.encrypted,jdbcType=VARCHAR},

? ? administrator = #{administrator,jdbcType=BOOLEAN}

? ? WHERE

? ? id = #{id,jdbcType=INTEGER}

? </update>


? <!-- ? Unique constraint check -->

? <select id="isUniqueUsername" parameterType="map" resultType="boolean">

? ? SELECT (count(*) = 0)

? ? FROM user

? ? WHERE ((#{userId,jdbcType=BIGINT} IS NOT NULL AND id != #{userId,jdbcType=BIGINT}) OR #{userId,jdbcType=BIGINT} IS

? ? NULL) ?<!-- other than me -->

? ? AND (username = #{username,jdbcType=VARCHAR})

? </select>


0 回復 有任何疑惑可以回復我~

刪除?

<!-- Mybatis中的配置信息,應用在一條具體的SQL語句上,通過resultMap標簽指向相對應的id名 ?-->

? <select id="queryMessageList" resultMap="MessageResult">

? ? select ID,COMMAND,DESCRIPTION,CONTENT from message where 1=1

? </select>

之后的sql語句

1 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消
通過自動回復機器人學Mybatis---基礎(chǔ)版
  • 參與學習       107413    人
  • 解答問題       831    個

微信公眾號自動回復功能學習Mybatis,基礎(chǔ)教程加案例實戰(zhàn)方式學習

進入課程

報錯`Message.xml中報錯`

我要回答 關(guān)注問題
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號