Add manager methods
This commit is contained in:
parent
4d1844d256
commit
f15a658f56
@ -0,0 +1,7 @@
|
||||
package ru.ulstu.manager.repository;
|
||||
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import ru.ulstu.manager.model.Manager;
|
||||
|
||||
public interface ManagerRepository extends JpaRepository<Manager, Integer> {
|
||||
}
|
20
src/main/java/ru/ulstu/manager/service/ManagerService.java
Normal file
20
src/main/java/ru/ulstu/manager/service/ManagerService.java
Normal file
@ -0,0 +1,20 @@
|
||||
package ru.ulstu.manager.service;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import ru.ulstu.manager.model.Manager;
|
||||
import ru.ulstu.manager.repository.ManagerRepository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class ManagerService {
|
||||
private final ManagerRepository managerRepository;
|
||||
|
||||
public ManagerService(ManagerRepository managerRepository) {
|
||||
this.managerRepository = managerRepository;
|
||||
}
|
||||
|
||||
public List<Manager> getManagers() {
|
||||
return managerRepository.findAll();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user