Skip to content

Removed @Autowired(s) from JwtAuthenticationFilter#5

Open
fabiogiannelli wants to merge 1 commit intoteddysmithdev:masterfrom
fabiogiannelli:master
Open

Removed @Autowired(s) from JwtAuthenticationFilter#5
fabiogiannelli wants to merge 1 commit intoteddysmithdev:masterfrom
fabiogiannelli:master

Conversation

@fabiogiannelli
Copy link

Springboot is accountable of getting them because they are both @Component, letting filterChain() free to just use them.
After that I pass these two params manually to a second @Bean (jwtAuthenticationFilter()) when invoked in http.AddFilterBefore(), invoking JwtAuthenticationFilter constructor with needed params without forcing a non-natural @Autowired injection into the instance variables declarations in its class body.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant