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

MyBatisX无法正确识别类的内部接口 #97

Open
ljnlxj opened this issue Aug 23, 2024 · 0 comments
Open

MyBatisX无法正确识别类的内部接口 #97

ljnlxj opened this issue Aug 23, 2024 · 0 comments

Comments

@ljnlxj
Copy link

ljnlxj commented Aug 23, 2024

当一个Mybatis的Mapper位于一个类的内部的时候,Mybatis的xml文件中,对于namespace的配置,需要包含"$"符号,这是因为对于Mybatis自身而言,内部类和内部接口的路径表示在xml的namesapce下,不能用OutClass.InnerClass的方式获取,只能是Outclass$InnerClass来获取,因此只有第二种使用"$"的方式,才会让Mybatis可以起作用,而第一种写法,会引起Mybatis直接报错误啦。
但是对于MybatisX插件而言,如果想要识别路径,依赖的是 . 的方式,反而忽略了$的方式。所以导致当一个mapper是一个类的内部接口的时候,mybatisX对于idea代码编辑框左边栏的黑色小鸟图标无法正常显示,且mapper接口中的方法会被标出红色下划线。希望这个问题在将来的版本中可以修复下。以便兼容Mybatis的内部类接口
WechatIMG19
WechatIMG21

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

1 participant