suppression AutoWired

Springboot
Victor SOULIER 1 year ago
parent 91cca9e810
commit 37ac092c55

@ -5,15 +5,16 @@ import fr.iut.sciencequest.sae.exceptions.DuplicatedFieldException;
import fr.iut.sciencequest.sae.exceptions.DuplicatedIdException;
import fr.iut.sciencequest.sae.exceptions.EntityNotFoundException;
import fr.iut.sciencequest.sae.repositories.ThematiqueRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class ThematiqueServiceImpl implements ThematiqueService{
@Autowired
private ThematiqueRepository thematiqueRepository;
private final ThematiqueRepository thematiqueRepository;
public ThematiqueServiceImpl(ThematiqueRepository thematiqueRepository){
this.thematiqueRepository = thematiqueRepository;
}
private void checkFieldsConstraints(Thematique thematique){
if(this.thematiqueRepository.existsByLibelle(thematique.getLibelle())){

Loading…
Cancel
Save