错误信息:
User does not have access to metadata required to determine stored procedure
parameter types. If rights can not be granted, configure connection with "noAccessToProcedureBodies=true"
to have driver generate parameters that represent INOUT strings irregardless of actual parameter types.
场景:
Springboot通过mybtis调用权限控制严格的mysql存储过程出现此异常。
原因:
当前账号没有对表mysql.proc的select权限或没有show create procudure权限
解决方式:
第一种: springboot代码中的jdbc连接url配置上"&noAccessToProcedureBodies=true";
第二种:使用mysql数据库管理员账号对普通账号授予相应的权限:GRANT SELECT ON mysql.proc TO 'user'@'%';