0
下面是我的mybatis.xml文件 -查詢數據庫時出錯。原因:java.lang.IllegalArgumentException異常:映射語句集合不包含價值getSecurityRowCount
<?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="com.principal.pfunds.service.rest.jdbcmanager.SecurityManagers">
<select id="getSecurityRowCount" parameterType="com.principal.pfunds.service.rest.mybatis.SecurityParam"
resultType="java.lang.Integer">
SELECT COUNT(*) ROWSCOUNT
FROM
${schema}.A_PDC_SCRTY
WHERE
TOKEN_ID = #{tokenID}
AND RSLT_TYP = #{resultType}
AND SVC_CD = #{svcCode}
</select>
我打電話來使用下面的代碼陳述書
此查詢Integer securityRowCount = getSqlSession().selectOne("getSecurityRowCount", securityParam);
我試圖讓行數,但它給我的錯誤是:
Exception in getSecurityRowCount(): org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for getSecurityRowCount
### Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for getSecurityRowCount
[4/13/17 22:05:17:734 IST] 000000a4 SystemOut O
請幫我一把。我無法理解這裏出了什麼問題。謝謝!
則應指定您正在使用'的MyBatis-spring' – blackwizard
你能幫我在這。我對此毫不知情。如何指定它? – Nitesh
沒關係,我實際上提交了已被接受的問題修訂。我添加了_spring-mybatis_標籤+一些格式。 @Jordan Lewis然後更新了一行格式。 – blackwizard