spring-in-action-6-samples
spring-in-action-6-samples copied to clipboard
chapter 5 lack the User class used in the In-memory user detail service
@habuma
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