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

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 回答

没有找到匹配的内容?试试慕课网站内搜索吧

添加回答

代码语言

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号