How to restrict routes in spring security dynamically?
问题 Good day, I am using spring security to restrict user, and i am using mongodb. I have created UserDetail and userDetail Services. her is my webSecurity config. @Configuration @EnableWebSecurity public class WebSecurityConfig extends WebSecurityConfigurerAdapter { @Bean public UserDetailsService mongoUserDetails() { return new CustomUserDetailsService(); } @Bean public DaoAuthenticationProvider authProvider() { DaoAuthenticationProvider authProvider = new DaoAuthenticationProvider();