Skip to content
Snippets Groups Projects

refactor: change injection strategy for UdsPersonUserDetailsServiceImpl

Merged Nicholas Blair requested to merge npblair/uw-spring-security:udsperson-constructor into master

UdsPersonUserDetailsServiceImpl is not initialized automatically by either of the primary 'local-users' or 'preauth' Profiles. It's typically constructed by downstream projects manually (not by component scanning).

Registering more than 1 UserDetailsService - say one for the uw-spring-security stack, and a different one for UdsPersonUserDetailsServiceImpl - will result in ApplicationContext initialization errors as the Configuration classes provided in uw-spring-security-config expect 1 and only 1 UserDetailsService.

The recommended use now for UdsPersonUserDetailsServiceImpl is to provide the needed UserDetailsService by hand, not by automatic autowiring. If the 1 UserDetailsService provided by uw-spring-security is appropriate, it's easy to retrieve from the ApplicationContext; if an alternate one is required it can be constructed without registering it as a @Bean.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading