java - Getting a MissingParamError after upgrading to Spring 6 - Stack Overflow

I recently upgraded an app from spring 5 to 6. Everything works, except this one thing. When I include

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条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信