myBatis配置報Mapped Statements collection does not contain value for
xception in thread "main" org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for com.yysr.mapper.userMapper.getUser
### Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for com.yysr.mapper.userMapper.getUser
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:107)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:98)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:62)
at com.yysr.main.MainTest.main(MainTest.java:37)
Caused by: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for com.yysr.mapper.userMapper.getUser
at org.apache.ibatis.session.Configuration$StrictMap.get(Configuration.java:775)
at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:615)
at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:608)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:103)
... 3 more
namespace可能寫錯,應該是<mapper namespace="com.yysr.mapper.userMapper">