mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-17 21:15:50 +00:00
Add @Qualifier to services
This commit is contained in:
parent
bedc97c048
commit
b912cca00f
3 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
|
|
|
@ -40,6 +40,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
* @author Michael Isvy
|
||||
*/
|
||||
@Service
|
||||
@Qualifier("ClinicService")
|
||||
public class ClinicServiceImpl implements ClinicService {
|
||||
|
||||
private PetRepository petRepository;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue