springboot 2.0中 PUT请求 接收不到参数解决办法

原本能够用HttpPutFormContentFilter这个类去解决的,可是在springboot2中 这类是deprecated 过时的。spring

经查询,被替代的类是FormContentFilterspringboot

因此解决办法以下:spa

@Configuration
@Slf4j
public class WebConfig extends WebMvcConfigurationSupport {


    @Bean
    public FormContentFilter formContentFilter() {
        return new FormContentFilter();
    }
}
复制代码

通过上面的配置,就能够解决问题。code

相关文章
相关标签/搜索