我使用vuelidate创建了一个验证,但提交表单后,即使我遇到错误,模态也会关闭。我正在将Bootstrap-Vue与VueJs一起使用。如果提交后出现错误,我希望打开模型。
@Configuration
@EnableWebSecurity
public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Configuration
@Order(1)
public class SwaggerSecurityConfig extends WebSecurityConfigurerAdapter {
private final AuthenticationProvider userPassAuthProvider;
@Autowired
SwaggerSecurityConfig(UserPassAuthProvider userPassAuthProvider) {
this.userPassAuthProvider = userPassAuthProvider;
}
@Override
protected void configure(HttpSecurity http) throws Exception {
http.antMatcher("/swagger**").
authorizeRequests().
antMatchers("/swagger**").authenticated().
and().httpBasic().and().csrf().disable();
}
@Override
public void configure(AuthenticationmanagerBuilder auth)
throws Exception {
auth.authenticationProvider(userPassAuthProvider);
}
}
@Configuration
@Order(2)
public class APISecurityConfig extends WebSecurityConfigurerAdapter {
private final AuthenticationProvider idAuthProvider;
@Autowired
APISecurityConfig(IDAuthProvider idAuthProvider) {
this.idAuthProvider = idAuthProvider;
}
@Override
protected void configure(HttpSecurity http) throws Exception {
http.antMatcher("/api/v1/**").
authorizeRequests().anyRequest().authenticated().
and().
addFilterBefore(idpAuthenticationFilter(authenticationmanager()),BasicAuthenticationFilter.class).sessionmanagement().
and().
csrf().disable();
}
@Override
public void configure(AuthenticationmanagerBuilder auth)
throws Exception {
auth.authenticationProvider(idAuthProvider);
}
IDPAuthenticationFilter idpAuthenticationFilter(Authenticationmanager auth) {
return new IDPAuthenticationFilter(auth,new OrRequestMatcher(new AntPathRequestMatcher(ApiRouter.API_PATH + "/**",HttpMethod.GET.toString()),new AntPathRequestMatcher(ApiRouter.API_PATH + "/**",HttpMethod.POST.toString()),HttpMethod.DELETE.toString()),new AntPathRequestMatcher("/swagger**",HttpMethod.GET.toString())));
}
}
}