版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/yangshuaionline/article/details/88662106
代码:
//判断表是否存在
@Select("SELECT table_name FROM information_schema.TABLES WHERE table_name ='AppComment'")
boolean isHaveTable();
问题:
org.apache.ibatis.binding.BindingException: Mapper method … attempted to return null from a method with a primitive return type (…).
问题原因:返回类型不正确
解决办法:
//判断表是否存在
@Select("SELECT table_name FROM information_schema.TABLES WHERE table_name ='AppComment'")
String isHaveTable();