动态SQL遇到了问题,请各位指点一下





错误原因:

Exception in thread "main" org.apache.ibatis.exceptions.PersistenceException:

Error querying database. Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for com.wyy.mapperCustomerMapper.fincustomerbyname

Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for com.wyy.mapperCustomerMapper.fincustomerbyname

at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)

at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:150)

at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:141)

at com.wyy.test.Testsql.main(Testsql.java:22)

Caused by: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for com.wyy.mapperCustomerMapper.fincustomerbyname

at org.apache.ibatis.session.Configuration$StrictMap.get(Configuration.java:875)

at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:708)

at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:701)

at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:147)

... 2 more

感觉是sql语句错了,但我看了好久感觉没问题呀

回答


一个明显的错误

com.wyy.mapperCustomerMapper.fincustomerbyname

少了一个标点

com.wyy.mapper.CustomerMapper.fincustomerbyname

以上是 动态SQL遇到了问题,请各位指点一下 的全部内容, 来源链接: utcz.com/a/37403.html

回到顶部