我有同样的问题,不确定,但我认为您需要以下命令:
@Overrideprotected void configure(HttpSecurity http) throws Exception { http .authorizeRequests() .antMatchers(HttpMethod.POST, "/api/auth*.png", "*.gif", "*.svg", "*.jpg", "*.html", "*.css", "*.js") .permitAll() .anyRequest() .authenticated() .and() .cors() .and() .exceptionHandling() .authenticationEntryPoint(this.jwtAuthenticationEntryPoint) .and() .sessionManagement() .sessionCreationPolicy(SessionCreationPolicy.STATELESS) .and() .csrf() .disable(); // Add our custom JWT security filter http.addFilterBefore(jwtAuthenticationFilter(), UsernamePasswordAuthenticationFilter.class);}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)