I already have antmatchers() in my spring security config that uses a wildcard . I need to filter out the "forms" from this wildcard. Here is my original code :
.antMatchers("/api/keepSessionAlive").authenticated()
.antMatchers("/api/users/**").authenticated()
I tried to change the wildcard to a regex as you can see below and it didn't work for me :
.antMatchers("/api/users/(?!forms).*").authenticated()
Any help would be greatly appreciated