Есть такой конфиг:
@Override
protected void configure(HttpSecurity http) throws Exception {
http
.csrf().disable()
.authorizeRequests()
.antMatchers("/one").hasRole("ADMIN")
.antMatchers("/two").hasAnyRole("USER", "ADMIN")
.and()
.requestCache()
.requestCache(new NullRequestCache())
.and()
.httpBasic();
}
Есть endpoint /four.
Что интересно. CURL запрос проходит, а в тестах на запрос к этому url приходит:
Full authentication is required to access this resource
Как мне настроить конфиг, что бы к нему иметь достуб без всяких аутентификаций (Spring Security)?
.antMatchers("/four").permitAll()
.antMatchers("/four").isAnonymous()
?