I recently upgraded an app from spring 5 to 6. Everything works, except this one thing. When I include hmac in a request to one of my apis, I get
"errorMessage":"Missing multipart request part message","errorCode":"MissingParamError","errorId"
The same request without hmac works fine though.
@RequestMapping(value="/register", method=RequestMethod.POST, produces="application/json")
@ResponseBody
public MobileRegistrationResponse processR(HttpServletRequest request,
@RequestPart(value="message",required=true) @Valid RegisterRequest registerRequest)
This is my endpoint. I also have the below filter that handles every incoming request first before it hits the endpoint
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
HttpServletRequest httpRequest = (HttpServletRequest) request;
MultireadRequestWrapper wrapper = new MultireadRequestWrapper(httpRequest);
try {
chain.doFilter(wrapper, response);
} catch(Exception e) {
log.error("Exception: ", e);
}
}
I haven't seen any docs on why this happens or how to handle it.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744860892a4597694.html
评论列表(0条)