spring boot 自己输出json数据
@RequestMapping("/json")
public void json(HttpServletResponse response, Pager pager, TruckFee entity) throws IOException{
response.addHeader("Access-Control-Allow-Origin", "*");
response.setHeader("Content-Type", "application/json;charset=UTF-8");
PrintWriter write = response.getWriter();
write.write("{id:100}");
write.flush();
}