We use spring boot version 2.1.12.RELEASE and our clients indicate us an issue with invalid json response like during our system is under stress testing.

It seems that response body has multiple json like that;

{"status":"success","systemTime":1599795099023,.....}
{"status":"failure","errorCode":"11","errorMessage":"Invalid request","systemTime":1599795099026}

We have also a custom error controller;

@Controller
public class GlobalErrorController {

    @RequestMapping(value = "/systemerror", consumes = MediaType.ALL_VALUE)
    @ResponseBody
    public ResponseEntity<Response> handleError() {
        Response response = new Response();
        response.setStatus(ResponseStatusType.FAILURE.getValue());
        response.setErrorCode("11");
        response.setErrorMessage("Invalid request");
        response.setSystemTime(Clock.systemUTC().millis());
        return new ResponseEntity<>(response, HttpStatus.OK);
    }
}

application.yml:

``` server: port: 8080 error: path: /systemerror whitelabel: enabled: false

Comment From: wilkinsona

Thanks for the report. Unfortunately, you haven't provided enough information for us to be able to help you. For example it's not clear what container you're using. 2.1.12 is also quite old, having been release 9 months ago. I would recommend upgrading to at least that latest 2.1.x release, but ideally to the latest 2.2.x or 2.3.x release as Spring Boot 2.1 will reach the end of its supported life at the beginning of next month.

If an upgrade does not help, and you would like us to spend some more time investigating, please spend some time providing a complete yet minimal sample that reproduces the problem. You can share it with us by pushing it to a separate repository on GitHub or by zipping it up and attaching it to this issue.

Comment From: recodyx

did you closed the issue without any fix?

I have got the same problem with Springboot: 2.6.3

Comment From: philwebb

@dit-j We weren't able to reproduce the issue. If you have a sample application that does, please provide it here and we can take a look.

Comment From: wilkinsona

@dit-j The issue was closed by the person who raised it.