如果你是用的mybatis-plus,mapper的方法名和xml里面的id对得上,那么这个报错的出现也有可能是没有添加配置
mybatis-plus: configuration: map-underscore-to-camel-case: true auto-mapping-behavior: full log-impl: org.apache.ibatis.logging.stdout.StdOutImpl mapper-locations: classpath*:mapper/**/*Mapper.xml