解决:Invalid bound statement (not found): com.XXXXX.UserMapper.countUser

问题:Invalid bound statement (not found): com.XXXXX.UserMapper.countUser

原因:mapper.java和mapper.xml映射不上

解决方法:

1、在application.properties全局配置文件中没有加上映射mapper文件的配置,mapper为resources下的文件,如果是dao就写mybatis.mapper-locations=classpath:/dao/*.xml

mybatis.mapper-locations=classpath:/mapper/*.xml

2、将resources下的mapper文件路径src下的mapper文件路径保持一致

解决:Invalid bound statement (not found): com.XXXXX.UserMapper.countUser_第1张图片

你可能感兴趣的:(BUG,数据库)