为了账号安全,请及时绑定邮箱和手机立即绑定

org.springframework.web.reactive.function

org.springframework.web.reactive.function

喵喔喔 2021-06-07 13:01:01
当我的代码是这样的时会出现错误:@Testpublic void getTemplateByIdTest() throws Exception {    client.get().uri("/template/getTemplate/7")            .exchange()            .expectStatus().isOk()            .expectHeader().contentType(MediaType.APPLICATION_JSON_UTF8)            .expectBody(VtTemplateVO.class)            .returnResult();}当我像这样更改我的代码时,就可以了!@Testpublic void getTemplateByIdTest() throws Exception {    client.get().uri("/template/getTemplate/7")            .exchange()            .expectStatus().isOk()            .expectHeader().contentType(MediaType.APPLICATION_JSON_UTF8)            .expectBody(String.class)            .returnResult();}为什么我用的.expectBody(VtTemplateVO.class)时候会说org.springframework.web.reactive.function.UnsupportedMediaTypeException: Content type 'application/json;charset=UTF-8' not supported有人知道吗?请帮忙,谢谢
查看完整描述

3 回答

  • 3 回答
  • 0 关注
  • 533 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信