Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package cl.sii.springboot.app.seguridad.service;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.stereotype.Service;
- import cl.sii.springboot.app.seguridad.modelo.User;
- import cl.sii.springboot.app.seguridad.repository.UserRepository;
- @Service
- public class UserServiceImpl implements UserService {
- private UserRepository userRepository;
- @Autowired
- public UserServiceImpl(UserRepository userRepository) {
- this.userRepository = userRepository;
- }
- @Override
- public void saveUser(User user) {
- userRepository.save(user);
- }
- @Override
- public User getUserByNameAndPassWord(String name, String password) {
- User user = userRepository.findByUserNameAndPassword(name, password);
- return user;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement