lineNumber: 61; columnNumber: 18; 值爲 "after" 的屬性 "order" 必須具有列表 "BEFORE AFTER " 中的值。

 今天使用Mybatis,配置了XML文件後,啓動時候報錯,錯誤信息如下:

 xml中的insert配置如下:

<!-- 添加用戶 -->
	<insert id="addUser" parameterType="com.ltf.entity.User"
		useGeneratedKeys="true" keyColumn="id" keyProperty="id">
		<selectKey keyProperty="id" resultType="java.lang.Integer"
			order="after">
			select
			last_insert_id()
		</selectKey>
		insert into
		<include refid="table" />
		(
		<include refid="edu_user_column" />
		)
		values(
		<include refid="edu_user_property" />
		)
	</insert>

錯誤原因:order值必須爲“BEFORE  AFTER”中的一個,大小寫敏感。

改正:把after改爲AFTER。

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章