232425262728293031
return new HibernateUserRepository(dataConfig.sessionFactory()); } @Bean public UserService userService() throws Exception { UserServiceImpl userService = new UserServiceImpl(); userService.setUserRepository(userRepository()); return userService; }