I am trying to secure a web application using Spring Security java configuration.
This is how the configuration looks:-
In case you use Spring Boot, the documentation states:
To switch off the Boot default configuration completely in a web application you can add a bean with @EnableWebSecurity
So if you want to fully customize itself that might be an option.
Just to make it clear... You just need to put @EnableWebSecurity annotation on your main application class or application configuration class.