Last active
August 14, 2018 07:25
-
-
Save jeetprksh/c54cc480133d1550df30328ba75eb48d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Service | |
public class UserServiceImpl implements UserService { | |
@Autowired | |
private UserDao userDao; | |
@Override | |
@Transactional(readOnly = true) | |
public ServerResponse getUser(Long userId) { | |
ServerResponse response = new ServerResponse(); | |
UserDTO dto = userDao.getUser(userId); | |
response.setUser(new User(dto.getFirstName() + " " + dto.getLastName(), | |
new Long(dto.getAge()))); | |
return response; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment