diff --git a/src/main/java/ru/ulstu/manager/repository/ManagerRepository.java b/src/main/java/ru/ulstu/manager/repository/ManagerRepository.java new file mode 100644 index 0000000..2928709 --- /dev/null +++ b/src/main/java/ru/ulstu/manager/repository/ManagerRepository.java @@ -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 { +} diff --git a/src/main/java/ru/ulstu/manager/service/ManagerService.java b/src/main/java/ru/ulstu/manager/service/ManagerService.java new file mode 100644 index 0000000..6e20cef --- /dev/null +++ b/src/main/java/ru/ulstu/manager/service/ManagerService.java @@ -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 getManagers() { + return managerRepository.findAll(); + } +}