-
Notifications
You must be signed in to change notification settings - Fork 40
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
Map<String, Object> 作为返回值没数据抛出 返回结果处理异常:null #56
Comments
刚刚提交一个版本,如果你用的是1.1.0-rc版本,可以自己先继承一个AbstractResultHandler<Map, Map>,参考MapResultHandler,加一个rowsSize为0的判断 |
判断条件如下: if (result.rowsSize() == 0) {
return null;
}
|
加了但是没起效
|
那你在 springboot 的入口,scanBasePackages 把 ngbatis 的包往前放 @SpringBootApplication(scanBasePackages = {"org.nebula.contrib", "your.domain"})
public class NgbatisDemoApplication {
} 修改 scanBasePackages 的顺序即可,其他保持你原来的样子。 等下个版本发布,到时候再来回复这个issue,你把刚刚创建的文件删掉即可。 |
好的,解决了感谢 |
不用这么客气的~ |
If this bug occurs in your project,
|
fix: #56 make it work well when returnType is Map and result is null
@zb139407 @hejiahuichengxuyuan |
当我使用一下语句查询的时候,Map<String, Object> 作为返回值,有值的时候正常,但是没值的时候为 org.nebula.contrib.ngbatis.exception.ResultHandleException: 返回结果处理异常:null
语句
The text was updated successfully, but these errors were encountered: