Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[错误报告]: interface 继承于 BaseMapper<T>并添加default 方法的时候,在ServiceImpl使用baseMapper调用该default方法报错 #6564

Open
3 tasks done
wjmboss opened this issue Oct 29, 2024 · 1 comment

Comments

@wjmboss
Copy link

wjmboss commented Oct 29, 2024

确认

  • 我使用的版本是最新版, 并且使用插件确认过项目里无依赖版本冲突
  • 我已经在 issue 中搜索过, 确认问题没有被提出过
  • 我已经修改标题, 将标题中的 描述 替换为遇到的问题

当前程序版本

3.5.7

问题描述

interface 继承于 BaseMapper并添加default 方法的时候,在ServiceImpl使用baseMapper调用该default方法报错,发现baseMapper可能是Proxy方式实现导致的问题.继承的代码如下:
interface XMapper extends BaseMapper {
default String getTableSchema() {
return "test"
}
}
在ServiceImpl使用baseMapper调用该getTableSchema()报错:
Caused by: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): XMapper.getTableSchema
希望作者能添加对BaseMapper接口继承default方法支持

详细堆栈日志

Caused by: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): XMapper.getTableSchema
@miemieYaho
Copy link
Member

git形式给出你的demo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants