From 30debcc63e6087d568f28b2ff07d577eb381285f Mon Sep 17 00:00:00 2001 From: Oliver Gierke Date: Mon, 6 Aug 2018 16:10:12 +0200 Subject: [PATCH] DATAREST-1268 - Deprecated obsolete RepositoryDetectionStrategies.EXPLICIT_METHOD_ANNOTATED. Deprecated the left-over from an original draft to fix DATAREST-1176. It was removed in master but not properly back-ported into 3.0.x. The annotation value deprecated is already gone in the latest 3.1 releases. Related tickets: DATAREST-1176. --- .../core/mapping/RepositoryDetectionStrategy.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/spring-data-rest-core/src/main/java/org/springframework/data/rest/core/mapping/RepositoryDetectionStrategy.java b/spring-data-rest-core/src/main/java/org/springframework/data/rest/core/mapping/RepositoryDetectionStrategy.java index 14b3d46db..cba3f0046 100644 --- a/spring-data-rest-core/src/main/java/org/springframework/data/rest/core/mapping/RepositoryDetectionStrategy.java +++ b/spring-data-rest-core/src/main/java/org/springframework/data/rest/core/mapping/RepositoryDetectionStrategy.java @@ -21,6 +21,7 @@ import org.springframework.core.annotation.AnnotationUtils; import org.springframework.data.repository.core.RepositoryMetadata; import org.springframework.data.rest.core.annotation.RepositoryRestResource; import org.springframework.data.rest.core.annotation.RestResource; +import org.springframework.data.rest.core.config.RepositoryRestConfiguration; /** * The strategy to determine whether a given repository is to be exported by Spring Data REST. @@ -99,9 +100,15 @@ public interface RepositoryDetectionStrategy { }, /** - * Behaves like the annotated strategy on repository level. But it does not export all methods - * of an exported Repository. The methods have to be annotated explicitly too. + * Behaves like the annotated strategy on repository level. But it does not export all methods of an exported + * Repository. The methods have to be annotated explicitly too. + * + * @deprecated since 3.0.10 with no replacement, as it's effectively the same as {@link #ANNOTATED}. To only expose + * annotated repository methods, rather use + * {@link RepositoryRestConfiguration#setExposeRepositoryMethodsByDefault(boolean)} to {@literal false}. + * Will be removed in 3.1. */ + @Deprecated EXPLICIT_METHOD_ANNOTATED { @Override