Skip navigation links
Spring Data Core
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help

Deprecated API

Contents

  • Terminally Deprecated
  • Interfaces
  • Classes
  • Enum Classes
  • Annotation Interfaces
  • Methods
  • Constructors
  • Terminally Deprecated Elements
    Element
    Description
    org.springframework.data.annotation.PersistenceConstructor
    in favor of PersistenceCreator since 3.0, to be removed in 3.1
    org.springframework.data.mapping.PersistentPropertyPath.getRequiredLeafProperty()
    use PersistentPropertyPath.getLeafProperty() instead.
    org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.createDefaultQueryMethodEvaluationContextProvider(ListableBeanFactory)
    since 3.4, use RepositoryFactoryBeanSupport.createDefaultEvaluationContextProvider(ListableBeanFactory) instead.
    org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.setEvaluationContextProvider(QueryMethodEvaluationContextProvider)
    since 3.4, use RepositoryFactoryBeanSupport.setEvaluationContextProvider(EvaluationContextProvider) instead.
    org.springframework.data.repository.core.support.RepositoryFactorySupport.getQueryLookupStrategy(QueryLookupStrategy.Key, QueryMethodEvaluationContextProvider)
    since 3.4, use RepositoryFactorySupport.getQueryLookupStrategy(Key, ValueExpressionDelegate) instead to support ValueExpression in query methods.
    org.springframework.data.repository.core.support.RepositoryFactorySupport.setEvaluationContextProvider(QueryMethodEvaluationContextProvider)
    since 3.4, use RepositoryFactorySupport.setEvaluationContextProvider(EvaluationContextProvider) instead.
    org.springframework.data.repository.core.support.RepositoryFragment.ImplementedRepositoryFragment(Optional<Class<T>>, T)
    since 3.4 - use ImplementedRepositoryFragment(java.lang.Class<T>,T) instead.
    org.springframework.data.repository.query.ExtensionAwareQueryMethodEvaluationContextProvider
    since 3.4 in favor of QueryMethodValueEvaluationContextAccessor.
    org.springframework.data.repository.query.Parameter(MethodParameter)
    since 3.1, use Parameter(MethodParameter, TypeInformation) instead.
    org.springframework.data.repository.query.Parameters(Method, Function<MethodParameter, T>)
    since 3.2.1, use Parameters(org.springframework.data.repository.query.ParametersSource,java.util.function.Function<org.springframework.core.MethodParameter,T>) instead.
    org.springframework.data.repository.query.QueryMethod.createParameters(Method, TypeInformation<?>)
    since 3.2.1, use QueryMethod.createParameters(ParametersSource) instead.
    org.springframework.data.repository.query.QueryMethodEvaluationContextProvider
    since 3.4 in favor of QueryMethodValueEvaluationContextAccessor.
    org.springframework.data.repository.query.ReactiveExtensionAwareQueryMethodEvaluationContextProvider
    since 3.4 in favor of QueryMethodValueEvaluationContextAccessor.
    org.springframework.data.repository.query.ReactiveQueryMethodEvaluationContextProvider
    since 3.4 in favor of QueryMethodValueEvaluationContextAccessor.
    org.springframework.data.repository.query.SpelEvaluator
    since 3.3, use ValueExpressionQueryRewriter instead.
    org.springframework.data.repository.query.SpelQueryContext
    since 3.3, use ValueExpressionQueryRewriter instead.
    org.springframework.data.repository.util.ClassUtils
    since 3.5, use ClassUtils instead.
    org.springframework.data.repository.util.ReactiveWrappers
    since 3.0, use ReactiveWrappers instead as the utility was moved into the org.springframework.data.util package.
    org.springframework.data.repository.util.ReactiveWrappers.ReactiveLibrary
    use ReactiveWrappers.ReactiveLibrary instead.
    org.springframework.data.util.CastUtils
    since 3.5 will be removed in a future release.
    org.springframework.data.util.ClassTypeInformation
    since 3.0 to go package protected at some point. Refer to TypeInformation only.
    org.springframework.data.util.ReflectionUtils.createInstanceIfPresent(String, T)
    since 3.5 as it is not used within the framework anymore.
    org.springframework.data.util.ReflectionUtils.findRequiredField(Class<?>, String)
    use ReflectionUtils.getRequiredField(Class, String) instead.
    org.springframework.data.util.ReflectionUtils.getMethod(Class<?>, String, ResolvableType...)
    org.springframework.data.util.ReflectionUtils.loadIfPresent(String, ClassLoader)
    org.springframework.data.web.PagedResourcesAssembler.getMethodParameter()
    since 3.1, rather set up the instance with PagedResourcesAssembler.withParameter(MethodParameter).
  • Deprecated Interfaces
    Interface
    Description
    org.springframework.data.mapping.model.SpELExpressionEvaluator
    org.springframework.data.repository.query.QueryMethodEvaluationContextProvider
    since 3.4 in favor of QueryMethodValueEvaluationContextAccessor.
    org.springframework.data.repository.query.ReactiveQueryMethodEvaluationContextProvider
    since 3.4 in favor of QueryMethodValueEvaluationContextAccessor.
    org.springframework.data.type.classreading.MethodsMetadataReader
    since 3.0, use MetadataReader to obtain declared methods directly.
    org.springframework.data.type.MethodsMetadata
    since 3.0, use MetadataReader directly to obtain declared methods directly.
    org.springframework.data.util.CastUtils
    since 3.5 will be removed in a future release.
  • Deprecated Classes
    Class
    Description
    org.springframework.data.mapping.model.DefaultSpELExpressionEvaluator
    since 3.3, use CachingValueExpressionEvaluatorFactory instead.
    org.springframework.data.mapping.model.SpELExpressionParameterValueProvider
    since 3.3, use ValueExpressionParameterValueProvider instead.
    org.springframework.data.repository.query.ExtensionAwareQueryMethodEvaluationContextProvider
    since 3.4 in favor of QueryMethodValueEvaluationContextAccessor.
    org.springframework.data.repository.query.ReactiveExtensionAwareQueryMethodEvaluationContextProvider
    since 3.4 in favor of QueryMethodValueEvaluationContextAccessor.
    org.springframework.data.repository.query.SpelEvaluator
    since 3.3, use ValueExpressionQueryRewriter instead.
    org.springframework.data.repository.query.SpelQueryContext
    since 3.3, use ValueExpressionQueryRewriter instead.
    org.springframework.data.repository.util.ClassUtils
    since 3.5, use ClassUtils instead.
    org.springframework.data.repository.util.ReactiveWrappers
    since 3.0, use ReactiveWrappers instead as the utility was moved into the org.springframework.data.util package.
    org.springframework.data.transaction.ChainedTransactionManager
    since 2.5
    org.springframework.data.type.classreading.MethodsMetadataReaderFactory
    since 3.0. Use SimpleMetadataReaderFactory directly.
    org.springframework.data.util.ClassTypeInformation
    since 3.0 to go package protected at some point. Refer to TypeInformation only.
  • Deprecated Enum Classes
    Enum Class
    Description
    org.springframework.data.repository.util.ReactiveWrappers.ReactiveLibrary
    use ReactiveWrappers.ReactiveLibrary instead.
  • Deprecated Annotation Interfaces
    Annotation Interface
    Description
    org.springframework.data.annotation.PersistenceConstructor
    in favor of PersistenceCreator since 3.0, to be removed in 3.1
  • Deprecated Methods
    Method
    Description
    org.springframework.data.mapping.model.MappingInstantiationException.getConstructor()
    since 3.0, use MappingInstantiationException.getEntityCreator() instead.
    org.springframework.data.mapping.model.ValueExpressionParameterValueProvider.potentiallyConvertSpelValue(Object, Parameter<T, P>)
    since 3.3, use ValueExpressionParameterValueProvider.potentiallyConvertExpressionValue(Object, Parameter) instead.
    org.springframework.data.mapping.Parameter.getSpelExpression()
    since 3.3, use Parameter.getValueExpression() instead.
    org.springframework.data.mapping.Parameter.hasSpelExpression()
    since 3.3, use Parameter.hasValueExpression() instead.
    org.springframework.data.mapping.PersistentEntity.getPersistenceConstructor()
    since 3.0, use PersistentEntity.getInstanceCreatorMetadata().
    org.springframework.data.mapping.PersistentEntity.isConstructorArgument(PersistentProperty<?>)
    since 3.0, use PersistentEntity.isCreatorArgument(PersistentProperty) instead.
    org.springframework.data.mapping.PersistentPropertyPath.getRequiredLeafProperty()
    use PersistentPropertyPath.getLeafProperty() instead.
    org.springframework.data.mapping.PreferredConstructor.isConstructorParameter(PersistentProperty<?>)
    since 3.0, use InstanceCreatorMetadata.isCreatorParameter(PersistentProperty) instead.
    org.springframework.data.repository.config.RepositoryBeanDefinitionRegistrarSupport.registerBeanDefinitions(AnnotationMetadata, BeanDefinitionRegistry)
    since 2.2, call RepositoryBeanDefinitionRegistrarSupport.registerBeanDefinitions(AnnotationMetadata, BeanDefinitionRegistry, BeanNameGenerator) instead.
    org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport.getModulePrefix()
    since 3.0, refer to RepositoryConfigurationExtension.getModuleIdentifier() instead and implement either RepositoryConfigurationExtensionSupport.getModuleName() directly or both methods if the default translation from name to identifier as defined in RepositoryConfigurationExtension.getModuleIdentifier() doesn't suit you.
    org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.createDefaultQueryMethodEvaluationContextProvider(ListableBeanFactory)
    since 3.4, use RepositoryFactoryBeanSupport.createDefaultEvaluationContextProvider(ListableBeanFactory) instead.
    org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.setEvaluationContextProvider(QueryMethodEvaluationContextProvider)
    since 3.4, use RepositoryFactoryBeanSupport.setEvaluationContextProvider(EvaluationContextProvider) instead.
    org.springframework.data.repository.core.support.RepositoryFactorySupport.getQueryLookupStrategy(QueryLookupStrategy.Key, QueryMethodEvaluationContextProvider)
    since 3.4, use RepositoryFactorySupport.getQueryLookupStrategy(Key, ValueExpressionDelegate) instead to support ValueExpression in query methods.
    org.springframework.data.repository.core.support.RepositoryFactorySupport.getTargetRepositoryViaReflection(Class<?>, Object...)
    since 2.6 because it has a misleading name. Use RepositoryFactorySupport.instantiateClass(Class, Object...) instead.
    org.springframework.data.repository.core.support.RepositoryFactorySupport.setEvaluationContextProvider(QueryMethodEvaluationContextProvider)
    since 3.4, use RepositoryFactorySupport.setEvaluationContextProvider(EvaluationContextProvider) instead.
    org.springframework.data.repository.query.QueryMethod.createParameters(Method, TypeInformation<?>)
    since 3.2.1, use QueryMethod.createParameters(ParametersSource) instead.
    org.springframework.data.repository.query.QueryMethod.createParameters(ParametersSource)
    since 3.5, use QueryMethod(Method, RepositoryMetadata, ProjectionFactory, Function) instead.
    org.springframework.data.repository.util.ClassUtils.getNumberOfOccurences(Method, Class<?>)
    Use ClassUtils.getNumberOfOccurrences(Method, Class).
    org.springframework.data.util.ClassTypeInformation.from(Class<S>)
    since 3.0. Use TypeInformation.of(org.springframework.core.ResolvableType) instead.
    org.springframework.data.util.ClassTypeInformation.fromReturnTypeOf(Method)
    since 3.0. Use TypeInformation.fromReturnTypeOf(Method) instead.
    org.springframework.data.util.ReflectionUtils.createInstanceIfPresent(String, T)
    since 3.5 as it is not used within the framework anymore.
    org.springframework.data.util.ReflectionUtils.findConstructor(Class<?>, Object...)
    since 3.5, return type will change to nullable instead of Optional.
    org.springframework.data.util.ReflectionUtils.findRequiredField(Class<?>, String)
    use ReflectionUtils.getRequiredField(Class, String) instead.
    org.springframework.data.util.ReflectionUtils.findRequiredMethod(Class<?>, String, Class<?>...)
    since 3.5, use ReflectionUtils.getRequiredMethod(Class, String, Class[]) instead.
    org.springframework.data.util.ReflectionUtils.getMethod(Class<?>, String, ResolvableType...)
    org.springframework.data.util.ReflectionUtils.loadIfPresent(String, ClassLoader)
    org.springframework.data.web.PagedResourcesAssembler.getMethodParameter()
    since 3.1, rather set up the instance with PagedResourcesAssembler.withParameter(MethodParameter).
  • Deprecated Constructors
    Constructor
    Description
    org.springframework.data.querydsl.QPageRequest(int, int)
    since 2.1, use QPageRequest.of(int, int) instead.
    org.springframework.data.querydsl.QPageRequest(int, int, OrderSpecifier<?>...)
    since 2.1, use QPageRequest.of(int, int, OrderSpecifier...) instead.
    org.springframework.data.querydsl.QPageRequest(int, int, QSort)
    since 2.1, use QPageRequest.of(int, int, QSort) instead.
    org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource(AnnotationMetadata, Class<? extends Annotation>, ResourceLoader, Environment, BeanDefinitionRegistry)
    since 2.2. Prefer to use overload taking a BeanNameGenerator additionally.
    org.springframework.data.repository.core.support.RepositoryFragment.ImplementedRepositoryFragment(Optional<Class<T>>, T)
    since 3.4 - use ImplementedRepositoryFragment(java.lang.Class<T>,T) instead.
    org.springframework.data.repository.query.Parameter(MethodParameter)
    since 3.1, use Parameter(MethodParameter, TypeInformation) instead.
    org.springframework.data.repository.query.Parameters(Method, Function<MethodParameter, T>)
    since 3.2.1, use Parameters(org.springframework.data.repository.query.ParametersSource,java.util.function.Function<org.springframework.core.MethodParameter,T>) instead.
    org.springframework.data.repository.query.QueryMethod(Method, RepositoryMetadata, ProjectionFactory)
    since 3.5, use QueryMethod(Method, RepositoryMetadata, ProjectionFactory, Function) instead.

Copyright © 2011–2025 Pivotal Software, Inc.. All rights reserved.