Application services
The only thing left to do is configure Spring Security to use the new artifacts.
We need to edit the DefaultCalendarService.java file and only remove the remaining code that was used to add USER_ROLE to any new User object that was created, as follows:
//com/packtpub/springsecurity/service/DefaultCalendarService.java
@Repository
public class DefaultCalendarService implements CalendarService {
... omitted for brevity ...
public int createUser(CalendarUser user) {
String encodedPassword = passwordEncoder.encode(user.getPassword());
user.setPassword(encodedPassword);
int userId = userDao.createUser(user);
return userId;
}
}