Skip to content

Instantly share code, notes, and snippets.

@raviyasas
Created December 17, 2021 19:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raviyasas/d4f271381dba2e4d894e7f001aa70d5c to your computer and use it in GitHub Desktop.
Save raviyasas/d4f271381dba2e4d894e7f001aa70d5c to your computer and use it in GitHub Desktop.
@Service
@Transactional
public class EmployeeService {
@Autowired
public EmployeeService(EmployeeRepository employeeRepository){
this.employeeRepository=employeeRepository;
}
private EmployeeRepository employeeRepository;
public List<Employee> getEmployees() {
return employeeRepository.findAll();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment