问题描述
如何重写这段代码以使用retrieve()方法?
suspend fun getEntity(): ResponseEntity<EntityDto> {
return restClient
.get()
.uri { ... }
.accept(MediaType.APPLICATION_JSON)
.awaitExchange()
.awaitEntity()
}
当我使用retrieve()时,我收到以下错误:
org.springframework.web.reactive.function.UnsupportedMediaTypeException: 内容类型 'application/json;charset=UTF-8' 不支持 bodyType=org.springframework.http.ResponseEntity
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)