backend-demo-tn/src/main/java/com/cubetiqs/demo/service/UserServiceImpl.java

24 lines
616 B
Java
Raw Normal View History

2020-06-16 19:19:26 +07:00
package com.cubetiqs.demo.service;
import com.cubetiqs.demo.domain.UserEntity;
import com.cubetiqs.demo.repository.UserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class UserServiceImpl implements UserService {
private final UserRepository userRepository;
@Autowired
public UserServiceImpl(UserRepository userRepository) {
this.userRepository = userRepository;
}
@Override
public List<UserEntity> findAllUsers() {
return userRepository.findAll();
}
}