@RequestMapping("/test")
public ResponseEntity<String> test() {
ResponseEntity<String> resp = ResponseEntity
.ok()
.contentType(MediaType.APPLICATION_JSON)
.body(json);
}
Spring mvc 单个@RequestMapping返回特定Content-Type的配置
最新推荐文章于 2024-08-06 13:12:26 发布