spring-in-action-6-samples icon indicating copy to clipboard operation
spring-in-action-6-samples copied to clipboard

chapter 5 lack the User class used in the In-memory user detail service

Open chenqping opened this issue 3 years ago • 1 comments

@habuma

chenqping avatar Jun 24 '21 08:06 chenqping

https://github.com/habuma/spring-in-action-6-samples/blob/64c50d1e1eb5485aafecef2749b0bcd1ca2edf38/ch05/taco-cloud-sfc/src/main/java/tacos/security/SecurityConfig.java

@Bean public UserDetailsService userDetailsService(UserRepository userRepo) { return username -> { User user = userRepo.findByUsername(username); if (user != null) { return user; } throw new UsernameNotFoundException( "User '" + username + "' not found"); }; }

Bad return type in lambda expression: User cannot be converted to UserDetailsService

kangourouNomade avatar Dec 31 '22 07:12 kangourouNomade