特定のURLのスプリングセキュリティを無効にする方法
ステートレススプリングセキュリティを使用していますが、サインアップの場合、スプリングセキュリティを無効にしたいです。 antMatchers("/api/v1/signup").permitAll(). しかし、それは機能していません、私は以下のエラーが発生しています: message=An Authentication object was not found in the SecurityContext, type=org.springframework.security.authentication.AuthenticationCredentialsNotFoundException これは、スプリングセキュリティフィルターが機能していることを意味すると思います 私のURLの順序は常に「/ api / v1」になります 私の春の設定は @Override protected void configure(HttpSecurity http) throws Exception { http. csrf().disable(). sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS). and(). authorizeRequests(). antMatchers("/api/v1/signup").permitAll(). anyRequest().authenticated(). and(). anonymous().disable(); http.addFilterBefore(new AuthenticationFilter(authenticationManager()), BasicAuthenticationFilter.class); } 私の認証フィルターは @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) …