spring data jpa 遇到的问题

org.springframework.core.convert.ConversionFailedException: Failed to convert from type [java.lang.Object[]] to type [com.jzh.graduation.entity.SysPermission] for value '{1, 权限管理, /sys/permission/**}'; nested exception is org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [java.lang.Integer] to type [com.jzh.graduation.entity.SysPermission]

原因:返回结果应该转换为对象SysPermission,JPA原生sql写在SysUserDao下(返回结果转换为SysUser),返回结果无法转换,应该写在SysPermissionDao下。

 

posted @ 2018-12-16 11:06  zhihang!  阅读(3687)  评论(0编辑  收藏  举报