Skip to content

Commit 38b9a0a

Browse files
committed
Deprecate pure repository SpEL support components for removal.
Closes #3207
1 parent 499abbe commit 38b9a0a

8 files changed

+16
-10
lines changed

src/main/java/org/springframework/data/repository/core/support/RepositoryFactoryBeanSupport.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ public void setEvaluationContextProvider(EvaluationContextProvider evaluationCon
190190
* @param evaluationContextProvider must not be {@literal null}.
191191
* @deprecated since 3.4, use {@link #setEvaluationContextProvider(EvaluationContextProvider)} instead.
192192
*/
193-
@Deprecated(since = "3.4")
193+
@Deprecated(since = "3.4", forRemoval = true)
194194
public void setEvaluationContextProvider(QueryMethodEvaluationContextProvider evaluationContextProvider) {
195195
setEvaluationContextProvider(evaluationContextProvider.getEvaluationContextProvider());
196196
}
@@ -258,7 +258,7 @@ protected Optional<EvaluationContextProvider> createDefaultEvaluationContextProv
258258
* @since 2.4
259259
* @deprecated since 3.4, use {@link #createDefaultEvaluationContextProvider(ListableBeanFactory)} instead.
260260
*/
261-
@Deprecated(since = "3.4")
261+
@Deprecated(since = "3.4", forRemoval = true)
262262
protected Optional<QueryMethodEvaluationContextProvider> createDefaultQueryMethodEvaluationContextProvider(
263263
ListableBeanFactory beanFactory) {
264264
return Optional.of(new ExtensionAwareQueryMethodEvaluationContextProvider(beanFactory));

src/main/java/org/springframework/data/repository/core/support/RepositoryFactorySupport.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
* @author John Blum
9494
* @author Johannes Englmeier
9595
*/
96+
@SuppressWarnings("removal")
9697
public abstract class RepositoryFactorySupport
9798
implements BeanClassLoaderAware, BeanFactoryAware, EnvironmentAware, EnvironmentCapable {
9899

@@ -216,7 +217,7 @@ public Environment getEnvironment() {
216217
* {@link QueryMethodEvaluationContextProvider#DEFAULT}.
217218
* @deprecated since 3.4, use {@link #setEvaluationContextProvider(EvaluationContextProvider)} instead.
218219
*/
219-
@Deprecated(since = "3.4")
220+
@Deprecated(since = "3.4", forRemoval = true)
220221
public void setEvaluationContextProvider(@Nullable QueryMethodEvaluationContextProvider evaluationContextProvider) {
221222
setEvaluationContextProvider(evaluationContextProvider == null ? EvaluationContextProvider.DEFAULT
222223
: evaluationContextProvider.getEvaluationContextProvider());
@@ -586,7 +587,7 @@ protected ProjectionFactory getProjectionFactory() {
586587
* @deprecated since 3.4, use {@link #getQueryLookupStrategy(Key, ValueExpressionDelegate)} instead to support
587588
* {@link org.springframework.data.expression.ValueExpression} in query methods.
588589
*/
589-
@Deprecated(since = "3.4")
590+
@Deprecated(since = "3.4", forRemoval = true)
590591
protected Optional<QueryLookupStrategy> getQueryLookupStrategy(@Nullable Key key,
591592
QueryMethodEvaluationContextProvider evaluationContextProvider) {
592593
return Optional.empty();

src/main/java/org/springframework/data/repository/query/ExtensionAwareQueryMethodEvaluationContextProvider.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
* @since 1.9
3939
* @deprecated since 3.4 in favor of {@link QueryMethodValueEvaluationContextAccessor}.
4040
*/
41-
@Deprecated(since = "3.4")
41+
@SuppressWarnings("removal")
42+
@Deprecated(since = "3.4", forRemoval = true)
4243
public class ExtensionAwareQueryMethodEvaluationContextProvider implements QueryMethodEvaluationContextProvider {
4344

4445
private final QueryMethodValueEvaluationContextAccessor delegate;

src/main/java/org/springframework/data/repository/query/QueryMethodEvaluationContextProvider.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
* @since 1.9
3131
* @deprecated since 3.4 in favor of {@link QueryMethodValueEvaluationContextAccessor}.
3232
*/
33-
@Deprecated(since = "3.4")
33+
@Deprecated(since = "3.4", forRemoval = true)
34+
@SuppressWarnings("removal")
3435
public interface QueryMethodEvaluationContextProvider {
3536

3637
QueryMethodEvaluationContextProvider DEFAULT = new ExtensionAwareQueryMethodEvaluationContextProvider(

src/main/java/org/springframework/data/repository/query/ReactiveExtensionAwareQueryMethodEvaluationContextProvider.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
* @since 2.4
3838
* @deprecated since 3.4 in favor of {@link QueryMethodValueEvaluationContextAccessor}.
3939
*/
40-
@Deprecated(since = "3.4")
40+
@SuppressWarnings("removal")
41+
@Deprecated(since = "3.4", forRemoval = true)
4142
public class ReactiveExtensionAwareQueryMethodEvaluationContextProvider
4243
extends ExtensionAwareQueryMethodEvaluationContextProvider
4344
implements ReactiveQueryMethodEvaluationContextProvider {

src/main/java/org/springframework/data/repository/query/ReactiveQueryMethodEvaluationContextProvider.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* @since 2.4
3131
* @deprecated since 3.4 in favor of {@link QueryMethodValueEvaluationContextAccessor}.
3232
*/
33-
@Deprecated(since = "3.4")
33+
@Deprecated(since = "3.4", forRemoval = true)
3434
public interface ReactiveQueryMethodEvaluationContextProvider extends QueryMethodEvaluationContextProvider {
3535

3636
ReactiveQueryMethodEvaluationContextProvider DEFAULT = new ReactiveExtensionAwareQueryMethodEvaluationContextProvider(

src/main/java/org/springframework/data/repository/query/SpelEvaluator.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
* @see SpelQueryContext#parse(String)
3838
* @deprecated since 3.3, use {@link ValueExpressionQueryRewriter} instead.
3939
*/
40-
@Deprecated(since = "3.3")
40+
@SuppressWarnings("removal")
41+
@Deprecated(since = "3.3", forRemoval = true)
4142
public class SpelEvaluator {
4243

4344
private static final SpelExpressionParser PARSER = new SpelExpressionParser();

src/main/java/org/springframework/data/repository/query/SpelQueryContext.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@
6060
* @since 2.1
6161
* @deprecated since 3.3, use {@link ValueExpressionQueryRewriter} instead.
6262
*/
63-
@Deprecated(since = "3.3")
63+
@SuppressWarnings("removal")
64+
@Deprecated(since = "3.3", forRemoval = true)
6465
public class SpelQueryContext {
6566

6667
private static final String SPEL_PATTERN_STRING = "([:?])#\\{([^}]+)}";

0 commit comments

Comments
 (0)