解BUG-Error creating SqlSource for SqlProvider. Method 'deleteById' not found in SqlProvider

转载:https://blog.csdn.net/qq314499182/article/details/99070253

多谢兄台,教会我解bug的方法。

1、找到异常原因,进行分析,把报错的地方能进行更改的改正过来(方法可以替换成数或者字符串)

2、Error creating SqlSource for SqlProvider. Method 'deleteById' not found in SqlProvider像这种错误,分析SqlSource类和SqlProvider类的源码,分析源码很重要。

通过SqlSource类去找继承关系,fn+f4,找到

1  if (this.providerMethod == null) {
2       throw new BuilderException("Error creating SqlSource for SqlProvider. Method '"
3           + providerMethodName + "' not found in SqlProvider '" + this.providerType.getName() + "'.");
4     }

并得知目前我们的providerMethod方法 是空,再结合异常信息this.providerType.getName()可以看到是哪个方法,回到程序对比一下,

问题解决,非常奈斯!

其实就是方法名没对应上,粗心了吧!

原文地址:https://www.cnblogs.com/soraya/p/13276541.html