Updating AccountController to use LdapUserDetailsService
We will now update the AccountController object to use the LdapDetailsUserDetailsService interface to look up the user that it displays:
//src/main/java/com/packtpub/springsecurity/web/controllers/AccountControll er.java
@Controller
public class AccountController {
private final UserDetailsService userDetailsService;
public AccountController(UserDetailsService userDetailsService) {
if (userDetailsService == null) {
throw new IllegalArgumentException("userDetailsService cannot be null");
}
this.userDetailsService = userDetailsService;
}
@RequestMapping("/accounts/my")
public String view(Model model) {
&...