Commit 4faf818e authored by matianhao's avatar matianhao

[审管办接口] <update> 设置响应头content-type为application/json

parent 485c1341
......@@ -11,7 +11,9 @@ import org.dom4j.io.SAXReader;
import org.json.JSONObject;
import org.json.XML;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
......@@ -261,7 +263,10 @@ public class SgbController {
// 返回json信息
jsonResult.put("success", true);
return ResponseEntity.status(HttpStatus.OK).body(jsonResult.toString());
return ResponseEntity
.status(HttpStatus.OK)
.header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE)
.body(jsonResult.toString());
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment