Allow all URLs but one in Spring security

If you’re using Java Configuration, you can use something like following in your configure method:

@Override
protected void configure(HttpSecurity http) throws Exception {
    http
            .authorizeRequests()
                .antMatchers("/employee/me").authenticated()
                .antMatchers("/**").permitAll();
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)