且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

无法将POST请求发送到Spring Resource服务器

更新时间:2023-01-01 16:52:09

哇...我的HTTPSecurity配置看起来像这样:

Whoops...my HTTPSecurity config looked like this:

http
    .authorizeRequests()
    .antMatchers(HTTPMethod.POST, "/api/search").permitAll()
    .anyRequest().authenticated()
    .and().httpBasic()

代替此:

http
    .authorizeRequests()
    .antMatchers("/api/search").permitAll()
    .anyRequest().authenticated()
    .and().httpBasic()