20 lines
679 B
Java
20 lines
679 B
Java
|
|
package com.ieslamar.GestionInventario.services;
|
||
|
|
|
||
|
|
import com.ieslamar.GestionInventario.entities.Departamento;
|
||
|
|
import com.ieslamar.GestionInventario.repos.DepartamentoRepository;
|
||
|
|
import com.ieslamar.GestionInventario.repos.UserRepository;
|
||
|
|
import org.springframework.stereotype.Service;
|
||
|
|
import java.util.List;
|
||
|
|
|
||
|
|
@Service
|
||
|
|
public class DepartamentoService {
|
||
|
|
private final DepartamentoRepository departamentoRepository;
|
||
|
|
|
||
|
|
public DepartamentoService(DepartamentoRepository departamentoRepository) {
|
||
|
|
this.departamentoRepository = departamentoRepository;
|
||
|
|
}
|
||
|
|
public List<Departamento> getAllDepartamentos() {
|
||
|
|
return departamentoRepository.findAll();
|
||
|
|
}
|
||
|
|
}
|