问题描述:
org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [org.springframework.data.jpa.repository.query.AbstractJpaQuery$TupleConverter$TupleBackedMap] to type [com.pit.system.dto.SysUserRoleDto]
问题分析:
1、jpa框架使用@Query方法查询数据,在装配到SysUserRoleDto中失败,因为SysUserRoleDto没有跟数据库表映射。
解决办法:使用EntityManager的createQuery()或createNativeQuery()方法进行手动映射。具体实现步骤请参考以下博客。
https://blog.csdn.net/qq_38974638/article/details/113142263
https://space.bilibili.com/484264966?spm_id_from=333.337.search-card.all.click

1万+

被折叠的 条评论
为什么被折叠?



