Could not find result map com.youotech.tl

mac2022-06-30  25

后端报错如下:

java.lang.IllegalArgumentException: Result Maps collection does not contain value for com.youotech.tl_cons_credit_rating.entity.Result

前端调用报错如下:

Whitelabel Error Page

This application has no explicit mapping for /error, so you are seeing this as a fallback.

Mon Sep 23 16:41:15 CST 2019 There was an unexpected error (type=Internal Server Error, status=500). Could not find result map com.youotech.tl_cons_credit_rating.entity.Result   问题原因:

resources/mapper里面误将返回类型resultType错写成resultMap类型了

使用resultMap时,必须要有<resultMap></resultMap>标签指明id和返回类型以及表字段的对应关系。

如果是直接返回一个用户定义的实体类型,则要使用resultType,弄混淆就会报错。

转载于:https://www.cnblogs.com/gigi2653/p/11573148.html

最新回复(0)