SqlMapClient operation; bad SQL grammar []; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException: InlineParameterMap

<select id="getResByName" resultClass="Resources" parameterClass="java.lang.String">
    select ID id,RESNAME resname from DIR_RESOURCES where RESNAME = #value# ;
   </select>

ibatis 语句切忌 不用加“;”否则就杯具了!

把 <select></select> 标签中,SQL语句的 ; 去掉,就成功了!

猜你喜欢

转载自www.cnblogs.com/moonsoft/p/11724982.html