亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

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 關注
  • 554 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號