无法上传文件,禁止上传组件 returns

Cannot upload files, Upload Components returns forbidden

我无法使用 UploadComponent 上传文件。我有一个 Spring 应用程序,使用启用了 Spring 安全性的 Vaadin 21。

spring 安全文件,如下所示:

@EnableWebSecurity
@Configuration
public class SecurityConfig extends VaadinWebSecurityConfigurerAdapter {

    // Our custom authentication provider
    @Autowired
    private AppCustomAuthenticationProvider authProvider;

    @Override
    protected void configure(HttpSecurity http) throws Exception {
        http.rememberMe().alwaysRemember(false);

        http.authorizeRequests().antMatchers("/VAADIN/**").permitAll();

        super.configure(http);

        // This is important to register your login view to the
        // view access checker mechanism:
        setLoginView(http, LoginView.class);

        // Set the default success Url
        http.formLogin().defaultSuccessUrl(ApplicationUrl.APP);

        // Set the default failure Url
        http.formLogin().failureUrl(ApplicationUrl.APP_LOGIN_FAILURE_URL);
    }

    /**
     * Configuration of the custom authentication provider
     */
    @Override
    protected void configure(AuthenticationManagerBuilder auth) throws Exception {
        auth.authenticationProvider(authProvider);
    }


    /**
     * Exclude Vaadin-framework communication and static assets from Spring Security
     */
    @Override
    public void configure(WebSecurity web) throws Exception {
        // Configure your static resources with public access here:
        web.ignoring().antMatchers(
                "/images/**"
        );

        // Delegating the ignoring configuration for Vaadin's
        // related static resources to the super class:
        super.configure(web);
    }
}

错误截图:

上传组件集成到Dialog中。

希望有人能帮助我, 弗洛里安

这已在 Vaadin 21 alpha 8 中修复,请参阅 https://github.com/vaadin/flow/pull/11278