简体   繁体   中英

form-data prameters are sent in body, causing the getParameter method to return null

I've recently upgraded to the spring boot version 2.6.3 while using camunda 7.17.0. The login camunda page, sends a post request, but the form-data parameters are sent in the body, causing the getParameter method to return null.

I am implementing the class Filter for camunda login:

@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
 throws IOException, ServletException {
    HttpServletRequest servletRequest = (HttpServletRequest) request;
    var param = servletRequest.getParameter(PARAMETER_KEY);
    //other things
}

but the parameter is returned as null.

Anyone knows how to solve it?

在 application.properties 文件中添加属性spring.mvc.hiddenmethod.filter.enabled=true解决了这个问题。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM