Mybatis 报错Mapper method 'xxx' has an unsupported return type

参考来源:https://blog.csdn.net/qq_41737716/article/details/80107192 

报错原因:

出现这种错误,说明sql语句执行成功,只是返回类型出了问题。

解决方法:

insert、delete、update操作默认返回一个int类型的整数,将增删改的接口改成int或者void即可。

select操作返回的类型可以是自定义的Map或者是List(目前遇到的),这里等我总结了resultType相关知识再回来补充!

猜你喜欢

转载自blog.csdn.net/Cary_1029/article/details/84945626