I have a spring boot app which produces a json response which is huge, its almost 2MB. I have tried solutions available online by trying to add the following in application.properties file but it didn't work, can someone help?
server.compression.enabled=true
server.compression.mime-types=application/json,application/xml,text/html,text/xml,text/plain
This is the method signature if it helps, I am using spring boot version 1.3.3 and testing the service with postman.
@RequestMapping(value="/getAssetsSMC",method=RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
public @ResponseBody String getAssetsSMC(@RequestParam(value = "accessKey", required = true) String accessKey) throws IOException
{
// code
return gson.toJson(products);
}