Add @Qualifier to services

This commit is contained in:
Vitaliy Fedoriv 2016-11-01 00:20:43 +02:00
parent bedc97c048
commit b912cca00f
3 changed files with 4 additions and 0 deletions

View file

@ -22,6 +22,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@Service
@Qualifier("ClinicServiceExt")
public class ClinicServiceExtImpl implements ClinicServiceExt {
private SpecialtyRepositoryExt specialtyRepositoryExt;

View file

@ -40,6 +40,7 @@ import org.springframework.transaction.annotation.Transactional;
* @author Michael Isvy
*/
@Service
@Qualifier("ClinicService")
public class ClinicServiceImpl implements ClinicService {
private PetRepository petRepository;

View file

@ -22,6 +22,7 @@ import java.util.Date;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.samples.petclinic.model.Owner;
import org.springframework.samples.petclinic.model.Pet;
import org.springframework.samples.petclinic.model.PetType;
@ -53,6 +54,7 @@ import org.springframework.transaction.annotation.Transactional;
public abstract class AbstractClinicServiceTests {
@Autowired
@Qualifier("ClinicService")
protected ClinicService clinicService;
@Test