diff --git a/src/main/java/guru/springframework/services/GreetingRepositoryImpl.java b/src/main/java/guru/springframework/services/GreetingRepositoryImpl.java index b56b4911..080a319c 100644 --- a/src/main/java/guru/springframework/services/GreetingRepositoryImpl.java +++ b/src/main/java/guru/springframework/services/GreetingRepositoryImpl.java @@ -1,8 +1,11 @@ package guru.springframework.services; +import org.springframework.stereotype.Repository; + /** * Created by jt on 5/24/17. */ +@Repository public class GreetingRepositoryImpl implements GreetingRepository { @Override diff --git a/src/main/java/guru/springframework/services/PrimaryGermanGreetingService.java b/src/main/java/guru/springframework/services/PrimaryGermanGreetingService.java index 5373f440..b9256a32 100644 --- a/src/main/java/guru/springframework/services/PrimaryGermanGreetingService.java +++ b/src/main/java/guru/springframework/services/PrimaryGermanGreetingService.java @@ -1,5 +1,6 @@ package guru.springframework.services; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Primary; import org.springframework.context.annotation.Profile; import org.springframework.stereotype.Service; @@ -12,6 +13,7 @@ @Profile("de") public class PrimaryGermanGreetingService implements GreetingService { + @Autowired private GreetingRepository greetingRepository; @Override diff --git a/src/main/java/guru/springframework/services/PrimaryGreetingService.java b/src/main/java/guru/springframework/services/PrimaryGreetingService.java index 6b99b856..696eb17a 100644 --- a/src/main/java/guru/springframework/services/PrimaryGreetingService.java +++ b/src/main/java/guru/springframework/services/PrimaryGreetingService.java @@ -1,5 +1,6 @@ package guru.springframework.services; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Primary; import org.springframework.context.annotation.Profile; import org.springframework.stereotype.Service; @@ -12,6 +13,7 @@ @Profile({"en", "default"}) public class PrimaryGreetingService implements GreetingService { + @Autowired private GreetingRepository greetingRepository; @Override diff --git a/src/main/java/guru/springframework/services/PrimarySpanishGreetingService.java b/src/main/java/guru/springframework/services/PrimarySpanishGreetingService.java index 67c0d623..e8872669 100644 --- a/src/main/java/guru/springframework/services/PrimarySpanishGreetingService.java +++ b/src/main/java/guru/springframework/services/PrimarySpanishGreetingService.java @@ -1,5 +1,6 @@ package guru.springframework.services; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Primary; import org.springframework.context.annotation.Profile; import org.springframework.stereotype.Service; @@ -12,6 +13,7 @@ @Primary public class PrimarySpanishGreetingService implements GreetingService { + @Autowired private GreetingRepository greetingRepository; @Override