My task is to transfer the code from the old project to the new Spring Boot project. Unfortunately i have a problem. In the old project, there was a servlet that worked with this code:
@Override
public void doGet(HttpServletRequest request) throws IOException {
int result = request.getInputStream().read(); // result > -1 depends on the request
}
In a springboot project:
@RequestMapping(value = "/**")
public void handleRequest(HttpServletRequest request) throws Exception {
int result = request.getInputStream().read(); // always return -1
}
How to get the valid InputStream from HttpServletRequest in SpringBoot project?