小编Loh*_*mar的帖子

异常:org.springframework.core.convert.ConverterNotFoundException:找不到能够从类型转换的转换器

我正在尝试使用本机查询从数据库中选择一些条件为 true 的列。当我收到邮递员的请求时,我收到上述错误。下面包含完整的日志。我正在 java 8 上运行 spring-boot 应用程序,Db 是 PostgreSQL。请指出出了什么问题以及如何解决。

错误日志 -

2020-01-17 14:12:23.281 ERROR 26528 --- [nio-8080-exec-3] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is 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.mastercard.ptsAmericas.QualityScore.models.ScoreCardForSummary]] with root cause

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.mastercard.ptsAmericas.QualityScore.models.ScoreCardForSummary]
    at org.springframework.core.convert.support.GenericConversionService.handleConverterNotFound(GenericConversionService.java:321) ~[spring-core-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:194) ~[spring-core-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:174) ~[spring-core-5.2.2.RELEASE.jar:5.2.2.RELEASE]
    at org.springframework.data.repository.query.ResultProcessor$ProjectingConverter.convert(ResultProcessor.java:297) ~[spring-data-commons-2.2.3.RELEASE.jar:2.2.3.RELEASE]
    at org.springframework.data.repository.query.ResultProcessor$ChainingConverter.lambda$and$0(ResultProcessor.java:217) …
Run Code Online (Sandbox Code Playgroud)

java spring-data-jpa spring-boot

5
推荐指数
1
解决办法
1万
查看次数

标签 统计

java ×1

spring-boot ×1

spring-data-jpa ×1