I’m trying to add security headers to my spring boot applicattion.
It already had a java class with multiple filters extending from WebSecurityConfigurerAdapter.
But whwnever I try to add the anottation @EnableWebSecurity to this class or even with a new custom one I always receive nullPointerException for the bean springSecurityFilterChain.
Changing the order to add some filters seems to solve this problem but whenever I try to enter the app I can’t because it seems the HTTP Authorization header field is null (which I recover inside one of my custom filters)
Do any have a clue of what is happening? Thanks in advantage!
This question is not yet answered, be the first one who answer using the comment. Later the confirmed answer will be published as the solution.