From: Gustavo Martin Morcuende Date: Tue, 23 Aug 2016 01:35:04 +0000 (+0200) Subject: Spring JPA: missing Named annotation in a few Spring services X-Git-Url: https://git.gumartinm.name/?a=commitdiff_plain;h=c53e84c360bb2b71f8a7ad58f12eed83cc4d4fba;p=JavaForFun Spring JPA: missing Named annotation in a few Spring services --- diff --git a/SpringJava/JPA/spring-jpa-resources/src/main/resources/log4j2.xml b/SpringJava/JPA/spring-jpa-resources/src/main/resources/log4j2.xml index 0936f8c..e31be95 100644 --- a/SpringJava/JPA/spring-jpa-resources/src/main/resources/log4j2.xml +++ b/SpringJava/JPA/spring-jpa-resources/src/main/resources/log4j2.xml @@ -56,7 +56,7 @@ diff --git a/SpringJava/JPA/spring-jpa-services/src/main/java/de/spring/example/services/impl/AdDescriptionRevisionServiceImpl.java b/SpringJava/JPA/spring-jpa-services/src/main/java/de/spring/example/services/impl/AdDescriptionRevisionServiceImpl.java index 4b76189..8aec9e3 100644 --- a/SpringJava/JPA/spring-jpa-services/src/main/java/de/spring/example/services/impl/AdDescriptionRevisionServiceImpl.java +++ b/SpringJava/JPA/spring-jpa-services/src/main/java/de/spring/example/services/impl/AdDescriptionRevisionServiceImpl.java @@ -1,11 +1,13 @@ package de.spring.example.services.impl; import javax.inject.Inject; +import javax.inject.Named; import de.spring.example.persistence.domain.AdDescription; import de.spring.example.persistence.repository.AdDescriptionRepository; import de.spring.example.services.AdDescriptionRevisionService; +@Named("adDescriptionRevisionService") public class AdDescriptionRevisionServiceImpl extends RevisionServiceImpl implements AdDescriptionRevisionService { diff --git a/SpringJava/JPA/spring-jpa-services/src/main/java/de/spring/example/services/impl/AdServiceImpl.java b/SpringJava/JPA/spring-jpa-services/src/main/java/de/spring/example/services/impl/AdServiceImpl.java index db3140f..05c416e 100644 --- a/SpringJava/JPA/spring-jpa-services/src/main/java/de/spring/example/services/impl/AdServiceImpl.java +++ b/SpringJava/JPA/spring-jpa-services/src/main/java/de/spring/example/services/impl/AdServiceImpl.java @@ -3,6 +3,7 @@ package de.spring.example.services.impl; import static org.springframework.data.jpa.domain.Specifications.where; import javax.inject.Inject; +import javax.inject.Named; import org.resthub.common.service.CrudServiceImpl; import org.springframework.data.domain.Page; @@ -13,6 +14,7 @@ import de.spring.example.persistence.domain.specifications.AdSpectifications; import de.spring.example.persistence.repository.AdRepository; import de.spring.example.services.AdService; +@Named("adService") public class AdServiceImpl extends CrudServiceImpl implements AdService { diff --git a/SpringJava/JPA/spring-jpa-services/src/main/java/de/spring/example/services/impl/RevisionServiceImpl.java b/SpringJava/JPA/spring-jpa-services/src/main/java/de/spring/example/services/impl/RevisionServiceImpl.java index f4a235b..6e587c3 100644 --- a/SpringJava/JPA/spring-jpa-services/src/main/java/de/spring/example/services/impl/RevisionServiceImpl.java +++ b/SpringJava/JPA/spring-jpa-services/src/main/java/de/spring/example/services/impl/RevisionServiceImpl.java @@ -2,6 +2,8 @@ package de.spring.example.services.impl; import java.io.Serializable; +import javax.inject.Named; + import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.history.Revision; @@ -11,6 +13,7 @@ import org.springframework.util.Assert; import de.spring.example.services.RevisionService; +@Named("revisionService") public class RevisionServiceImpl, R extends RevisionRepository> implements RevisionService {