Deprecated API
Contents
- Terminally Deprecated
- Interfaces
- Classes
- Exception Classes
- Annotation Interfaces
- Fields
- Methods
- Constructors
- Enum Constants
- Annotation Interface Elements
-
Terminally Deprecated ElementsElementDescriptionas of 7.0 in favor of the
-XX:MissingRegistrationReportingMode=Warnand-XX:MissingRegistrationReportingMode=ExitJVM flags with GraalVM.with no replacement since introspection is included whenadding a reflection hint for a type.with no replacement since introspection is included whenadding a reflection hint for a type.in favor ofMemberCategory.ACCESS_DECLARED_FIELDSwith similar semantics.with no replacement since introspection is included whenadding a reflection hint for a type.with no replacement since introspection is added by default whenadding a reflection hint for a type.with no replacement since introspection is included whenadding a reflection hint for a type.with no replacement since introspection is added by default whenadding a reflection hint for a type.with no replacement since introspection is included whenadding a reflection hint for a type.in favor ofMemberCategory.ACCESS_PUBLIC_FIELDSwith similar semantics.since 7.0 in favor ofReflectionHintsPredicates.onConstructorInvocation(Constructor)orReflectionHintsPredicates.onType(Class).since 7.0 in favor ofReflectionHintsPredicates.onFieldAccess(Class, String)with similar semantics.since 7.0 in favor ofReflectionHintsPredicates.onFieldAccess(Field)with similar semantics.since 7.0 in favor ofReflectionHintsPredicates.onFieldAccess(String, String)with similar semantics.since 7.0 in favor ofReflectionHintsPredicates.onMethodInvocation(Class, String)orReflectionHintsPredicates.onType(Class).since 7.0 in favor ofReflectionHintsPredicates.onMethodInvocation(Method)orReflectionHintsPredicates.onType(Class).since 7.0 in favor ofReflectionHintsPredicates.onMethodInvocation(String, String)orReflectionHintsPredicates.onType(Class).as of 7.0 in favor of the-XX:MissingRegistrationReportingMode=Warnand-XX:MissingRegistrationReportingMode=ExitJVM flags with GraalVM.as of 5.2, along withPropertyPlaceholderConfigurer; to be removed in 8.0as of 5.2, to be removed in 8.0; useorg.springframework.context.support.PropertySourcesPlaceholderConfigurerinstead which is more flexible through taking advantage of theEnvironmentandPropertySourcemechanisms.as of Spring Framework 7.0 in favor ofMapAccessor.as of 6.1, in favor of the AOT engine and the forthcoming support for an AOT-generated Spring components indexsince 7.0 in favor ofFileSystemResourceas of 7.0, in favor of direct injection of client dependenciessince 7.0 in favor ofJacksonCborDecodersince 7.0 in favor ofJacksonCborEncodersince 7.0 in favor ofAbstractJacksonDecodersince 7.0 in favor ofAbstractJacksonEncodersince 7.0 in favor ofJacksonCodecSupportsince 7.0 in favor ofAbstractJacksonDecodersince 7.0 in favor ofJacksonJsonEncodersince 7.0 in favor ofJacksonSmileDecodersince 7.0 in favor ofJacksonSmileEncodersince 7.0 in favor ofJacksonCborHttpMessageConvertersince 7.0 in favor ofAbstractJacksonHttpMessageConvertersince 7.0 in favor using directly Jackson 3 builders likeJsonMapper.builder()since 7.0 in favor of using directly Jackson 3 converters default constructorsince 7.0 in favor ofJacksonJsonHttpMessageConvertersince 7.0 in favor of usingSmartHttpMessageConverterhintssince 7.0 in favor of usingSmartHttpMessageConverterhintssince 7.0 in favor ofJacksonHandlerInstantiatorsince 7.0 in favor ofJacksonSmileHttpMessageConvertersince 7.0 in favor ofJacksonXmlHttpMessageConvertersince 7.0 in favor ofJacksonYamlHttpMessageConverterin favor ofHttpEntity(Object, HttpHeaders)in favor ofHttpEntity(HttpHeaders)This method is provided for backward compatibility with APIs that would only accept maps. Generally avoid using HttpHeaders as a Map or MultiValueMap.in favor ofHttpHeaders.toSingleValueMap()which performs a copy but ensures that collection-iterating methods likeentrySet()are case-insensitivein favor ofRequestEntity(HttpHeaders, HttpMethod, URI)in favor ofResponseEntity(Object, HttpHeaders, int)in favor ofResponseEntity(HttpHeaders, HttpStatusCode)as of 7.0, in favor of direct injection ofNamedParameterJdbcTemplateorJdbcClientas of 7.0, in favor of direct injection ofJdbcTemplateorJdbcClientas of 7.0, in favor of direct injection ofJmsTemplateorJmsMessagingTemplatesince 7.0 in favor ofJacksonJsonMessageConvertersince 7.0 in favor ofJacksonJsonMessageConverteras of Spring Framework 6.2.4, in favor ofAotContextLoader.loadContextForAotProcessing(MergedContextConfiguration, RuntimeHints); to be removed in Spring Framework 8.0As of Spring Framework 6.2.6, in favor ofBeanOverrideHandler(Field, ResolvableType, String, String, BeanOverrideStrategy)as of Spring Framework 6.2.4, in favor ofAbstractDelegatingSmartContextLoader.loadContextForAotProcessing(MergedContextConfiguration, RuntimeHints); to be removed in Spring Framework 8.0as of Spring Framework 6.2.4, in favor ofAbstractGenericContextLoader.loadContextForAotProcessing(MergedContextConfiguration, RuntimeHints); to be removed in Spring Framework 8.0as of 6.2.13, in favor ofTestConstructorUtils.isAutowirableConstructor(Executable, PropertyProvider); to be removed in Spring Framework 7.1as of 6.2.13, in favor ofTestConstructorUtils.isAutowirableConstructor(Executable, PropertyProvider); to be removed in Spring Framework 7.1as of 6.2.13, in favor ofTestConstructorUtils.isAutowirableConstructor(Executable, PropertyProvider); to be removed in Spring Framework 7.1as of 6.2.13, in favor ofTestConstructorUtils.isAutowirableConstructor(Executable, PropertyProvider); to be removed in Spring Framework 7.1as of Spring Framework 6.2.4, in favor ofAbstractGenericWebContextLoader.loadContextForAotProcessing(MergedContextConfiguration, RuntimeHints); to be removed in Spring Framework 8.0in favor of callingString.formatted(Object...)upfrontuse ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.since 7.0 in favor ofRestClient.Builder.configureMessageConverters(Consumer)since 7.0 in favor ofRestClient.Builder.configureMessageConverters(Consumer)use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.as of 5.3 in favor of usingUrlBasedCorsConfigurationSource.setUrlPathHelper(UrlPathHelper), if at all. For further details, please seeUrlBasedCorsConfigurationSource.setAllowInitLookupPath(boolean).use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.as of 5.3 in favor of usingUrlBasedCorsConfigurationSource.setUrlPathHelper(UrlPathHelper), if at all. For further details, please seeUrlBasedCorsConfigurationSource.setAllowInitLookupPath(boolean).as of 5.3 in favor of usingUrlBasedCorsConfigurationSource.setUrlPathHelper(UrlPathHelper), if at all. For further details, please seeUrlBasedCorsConfigurationSource.setAllowInitLookupPath(boolean).use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.without replacement to discourage use of path extensions for request mapping and for content negotiation (with similar deprecations and removals already applied to annotated controllers). For further context, please read issue #24179without replacement to discourage use of path extensions for request mapping and for content negotiation (with similar deprecations and removals already applied to annotated controllers). For further context, please read issue #24179without replacement to discourage use of path extensions for request mapping and for content negotiation (with similar deprecations and removals already applied to annotated controllers). For further context, please read issue #24179use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcheris deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcheris deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcheris deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.since 7.0 in favor ofWebMvcConfigurationSupport.createMessageConverters()use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.since 7.0 in favor of configuring converters onWebMvcConfigurer.configureMessageConverters(HttpMessageConverters.ServerBuilder)since 7.0 in favor of configuring converters onWebMvcConfigurer.configureMessageConverters(HttpMessageConverters.ServerBuilder)without replacement to discourage use of path extensions for request mapping and for content negotiation (with similar deprecations and removals already applied to annotated controllers). For further context, please read issue #24179without replacement to discourage use of path extensions for request mapping and for content negotiation (with similar deprecations and removals already applied to annotated controllers). For further context, please read issue #24179without replacement to discourage use of path extensions for request mapping and for content negotiation (with similar deprecations and removals already applied to annotated controllers). For further context, please read issue #24179use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.in favor of using justPathPatternParser; whenHandlerMappingIntrospector.allHandlerMappingsUsePathPatternParser()returns true, it is sufficient to use that to align with handler mappings.in favor of the constructor variant with HTTP methodsuse ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.together withHandlerMappingIntrospectorwithout a replacement.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.together withHandlerMappingIntrospectorwithout a replacement.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules. After the deprecation phase, it will no longer be possible to set a customized PathMatcher instance.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules. After the deprecation phase, it will no longer be possible to set a customized PathMatcher instance.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules. After the deprecation phase, it will no longer be possible to set a customized PathMatcher instance.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules. After the deprecation phase, it will no longer be possible to set a customized PathMatcher instance.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.since 7.0. Libraries or applications can provide their ownViewclass or perform rendering in web handlers directly.since 7.0. Libraries or applications can provide their ownViewclass or perform rendering in web handlers directly.since 7.0. Libraries or applications can provide their ownViewclass or perform rendering in web handlers directly.since 7.0. Libraries or applications can provide their ownViewclass or perform rendering in web handlers directly.since 7.0. Libraries or applications can provide their ownViewclass or perform rendering in web handlers directly.since 7.0. Libraries or applications can provide their ownViewclass or perform rendering in web handlers directly.since 7.0. Libraries or applications can provide their ownViewclass or perform rendering in web handlers directly.since 7.0. Libraries or applications can provide their ownViewclass or perform rendering in web handlers directly.since 7.0 in favor ofAbstractJacksonViewsince 7.0 in favor ofJacksonJsonViewsince 7.0 in favor ofJacksonXmlViewuse ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.since 7.0 in favor ofJacksonJsonSockJsMessageCodec
-
Deprecated InterfacesInterfaceDescriptionas of 6.2, in favor of
SqlBinaryValueandSqlCharacterValueas of 6.2, in favor ofSqlBinaryValueandSqlCharacterValueas of 6.2, in favor of directResultSet.getSQLXML(int)andConnection.createSQLXML()usage, possibly in combination with a customSqlValueimplementationas of 6.2, in favor of a directSqlValueimplementationas of 6.2, in favor of directSQLXMLusageas of 6.2, in favor of directSQLXMLusageas of 6.2, in favor of directSQLXMLusagesince Spring Framework 7.0 in favor of theSpringExtensionand JUnit Jupitertogether withHandlerMappingIntrospectorwithout a replacement.
-
Deprecated ClassesClassDescriptionThis class should only be used by the runtime-hints agent when instrumenting bytecode and is not considered public API.as of 7.0 in favor of the
-XX:MissingRegistrationReportingMode=Warnand-XX:MissingRegistrationReportingMode=ExitJVM flags with GraalVM.as of 7.0 in favor of the-XX:MissingRegistrationReportingMode=Warnand-XX:MissingRegistrationReportingMode=ExitJVM flags with GraalVM.as of 5.2, along withPropertyPlaceholderConfigurer; to be removed in 8.0as of 5.2, to be removed in 8.0; useorg.springframework.context.support.PropertySourcesPlaceholderConfigurerinstead which is more flexible through taking advantage of theEnvironmentandPropertySourcemechanisms.in favor of Spring's common bean definition formats and/or custom reader implementationsas of 6.0 in favor of implementingCachingConfigurerdirectlyas of 6.0 in favor of implementingJCacheConfigurerdirectlyas of Spring Framework 7.0 in favor ofMapAccessor.as of 6.1, in favor of the AOT engine and the forthcoming support for an AOT-generated Spring components indexsince 6.1 with no replacement; use an enum, map, or similar custom solution insteadsince 6.1 with no plans for a replacementsince 7.0 in favor ofFileSystemResourceas of 7.0, in favor of direct injection of client dependenciessince 7.0 in favor ofJacksonCborDecodersince 7.0 in favor ofJacksonCborEncodersince 7.0 in favor ofAbstractJacksonDecodersince 7.0 in favor ofAbstractJacksonEncodersince 7.0 in favor ofJacksonCodecSupportsince 7.0 in favor ofAbstractJacksonDecodersince 7.0 in favor ofJacksonJsonEncodersince 7.0 in favor ofJacksonSmileDecodersince 7.0 in favor ofJacksonSmileEncodersince 7.0 in favor ofJacksonCborHttpMessageConvertersince 7.0 in favor ofAbstractJacksonHttpMessageConvertersince 7.0 in favor using directly Jackson 3 builders likeJsonMapper.builder()since 7.0 in favor of using directly Jackson 3 converters default constructorsince 7.0 in favor ofJacksonJsonHttpMessageConvertersince 7.0 in favor of usingSmartHttpMessageConverterhintssince 7.0 in favor of usingSmartHttpMessageConverterhintssince 7.0 in favor ofJacksonHandlerInstantiatorsince 7.0 in favor ofJacksonSmileHttpMessageConvertersince 7.0 in favor ofJacksonXmlHttpMessageConvertersince 7.0 in favor ofJacksonYamlHttpMessageConverteras of 7.0, in favor of direct injection ofNamedParameterJdbcTemplateorJdbcClientas of 6.2, in favor ofSqlBinaryValueandSqlCharacterValueas of 6.2 along withLobHandler, in favor ofResultSet.getBinaryStream(int)/ResultSet.getCharacterStream(int)usagein favor of Spring's common bean definition formats and/or custom reader implementationsas of 7.0, in favor of direct injection ofJdbcTemplateorJdbcClientas of 6.2, in favor ofSqlBinaryValueandSqlCharacterValueas of 6.2, in favor ofSqlBinaryValueandSqlCharacterValueas of 6.2, in favor ofSqlBinaryValueandSqlCharacterValueas of 6.2, in favor ofSqlBinaryValueandSqlCharacterValueas of 6.2, in favor of directResultSet.getSQLXML(int)andConnection.createSQLXML()usage, possibly in combination with a customSqlValueimplementationas of 7.0, in favor of direct injection ofJmsTemplateorJmsMessagingTemplatesince 7.0 in favor ofJacksonJsonMessageConvertersince 7.0 in favor ofJacksonJsonMessageConvertersince 6.0, useio.r2dbc.spi.Parameterinstead.as of 6.0 in favor of implementingAsyncConfigurerdirectlyas of 6.0, in favor ofCompletableFuturesince Spring Framework 7.0 with no replacementsince Spring Framework 7.0 in favor of theSpringExtensionand JUnit Jupitersince Spring Framework 7.0 with no replacementsince Spring Framework 7.0 in favor of theSpringExtensionand JUnit Jupitersince Spring Framework 7.0 in favor of theSpringExtensionand JUnit Jupitersince Spring Framework 7.0 in favor of theSpringExtensionand JUnit Jupitersince Spring Framework 7.0 in favor of theSpringExtensionand JUnit Jupitersince Spring Framework 7.0 in favor of theSpringExtensionand JUnit Jupitersince Spring Framework 7.0 in favor of theSpringExtensionand JUnit Jupitersince Spring Framework 7.0 in favor of theSpringExtensionand JUnit Jupitersince Spring Framework 7.0 in favor of theSpringExtensionand JUnit Jupitersince Spring Framework 7.0 in favor of theSpringExtensionand JUnit Jupitersince Spring Framework 7.0 in favor of theSpringExtensionand JUnit Jupitersince Spring Framework 7.0 in favor of theSpringExtensionand JUnit Jupitersince Spring Framework 7.0 in favor of theSpringExtensionand JUnit Jupitersince Spring Framework 7.0 in favor of theSpringExtensionand JUnit Jupitersince Spring Framework 7.0 in favor of theSpringExtensionand JUnit Jupitersince Spring Framework 7.0 in favor of theSpringExtensionand JUnit Jupitersince Spring Framework 7.0 in favor of theSpringExtensionand JUnit Jupiterin favor of usingJSONAssertdirectly or theJsonComparatorabstractionin favor ofRestTestClient.bindTo(MockMvc)as of 6.0, in favor of a straightJtaTransactionManagerdefinitionas of 7.0, superseded byTransactionOperations.executeWithoutResult(Consumer)as of 5.3, in favor of the default methods on theTransactionSynchronizationinterfaceas of 6.1 in favor ofComparator.naturalOrder()as of 6.1 in favor ofComparator.nullsLast(Comparator)andComparator.nullsFirst(Comparator)as of 6.0, with no concrete replacementin favor of using justPathPatternParser; whenHandlerMappingIntrospector.allHandlerMappingsUsePathPatternParser()returns true, it is sufficient to use that to align with handler mappings.together withHandlerMappingIntrospectorwithout a replacement.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.since 7.0. Libraries or applications can provide their ownViewclass or perform rendering in web handlers directly.since 7.0. Libraries or applications can provide their ownViewclass or perform rendering in web handlers directly.since 7.0. Libraries or applications can provide their ownViewclass or perform rendering in web handlers directly.since 7.0. Libraries or applications can provide their ownViewclass or perform rendering in web handlers directly.since 7.0. Libraries or applications can provide their ownViewclass or perform rendering in web handlers directly.since 7.0. Libraries or applications can provide their ownViewclass or perform rendering in web handlers directly.since 7.0. Libraries or applications can provide their ownViewclass or perform rendering in web handlers directly.since 7.0. Libraries or applications can provide their ownViewclass or perform rendering in web handlers directly.since 7.0 in favor ofAbstractJacksonViewsince 7.0 in favor ofJacksonJsonViewsince 7.0 in favor ofJacksonXmlViewsince 7.0 in favor ofJacksonJsonSockJsMessageCodec
-
Deprecated Exception ClassesException ClassDescriptionsince the common executors do not support start timeoutsas of 6.0.3, in favor of
PessimisticLockingFailureException/CannotAcquireLockExceptionas of 6.0.3 since it is not in use within core JDBC/ORM supportas of 6.0.3, in favor ofPessimisticLockingFailureException/CannotAcquireLockExceptionas of 6.2 along withLobHandleras of 6.2, in favor of directResultSet.getSQLXML(int)andConnection.createSQLXML()usage, possibly in combination with a customSqlValueimplementationsince 7.0 in favor ofHttpClientErrorException.UnprocessableContentsince 7.0 in favor ofWebClientResponseException.UnprocessableContentsince 7.0 in favor ofContentTooLargeException
-
Deprecated Annotation InterfacesAnnotation InterfaceDescriptionuse
NonNullinsteaduseNullMarkedinsteaduseNullMarkedinsteaduseNullableinsteadsince Spring Framework 7.0 in favor of theSpringExtensionand JUnit Jupitersince Spring Framework 7.0 in favor of theSpringExtensionand JUnit Jupitersince Spring Framework 7.0 in favor of theSpringExtensionand JUnit Jupitersince Spring Framework 7.0 in favor of theSpringExtensionand JUnit Jupiter
-
Deprecated FieldsFieldDescriptionUse
ClassReader.readByte(int)and the other read methods instead. This field will eventually be deleted.If you are using mixed autowiring strategies, prefer annotation-based autowiring for clearer demarcation of autowiring needs.If you are using mixed autowiring strategies, use annotation-based autowiring for clearer demarcation of autowiring needs.this customizer might result in unexpected class leak since key object still holds a strong reference to the Object and class. It is recommended to have pre-processing method that would strip Objects and represent Classes as Stringssince theMergedAnnotationsmodel always ignores lang annotations according to theAnnotationFilter.PLAINfilter, for efficiency reasonsalong withAsyncTaskExecutor.execute(Runnable, long)along withAsyncTaskExecutor.execute(Runnable, long)as of 6.1, in favor of the"autodetect" flagas of 6.1, in favor of the"autodetect" flagas of 6.1, in favor of the"autodetect" flagas of 6.1, in favor of the"autodetect" flagin favor ofUrlPathHelper.PATH_ATTRIBUTEandServletRequestPathUtils.PATH_ATTRIBUTE. To access the cached path used for request mapping, useServletRequestPathUtils.getCachedPathValue(ServletRequest).
-
Deprecated MethodsMethodDescriptionsince 7.0 in favor of
ReflectionHintsPredicates.onConstructorInvocation(Constructor)orReflectionHintsPredicates.onType(Class).since 7.0 in favor ofReflectionHintsPredicates.onFieldAccess(Class, String)with similar semantics.since 7.0 in favor ofReflectionHintsPredicates.onFieldAccess(Field)with similar semantics.since 7.0 in favor ofReflectionHintsPredicates.onFieldAccess(String, String)with similar semantics.since 7.0 in favor ofReflectionHintsPredicates.onMethodInvocation(Class, String)orReflectionHintsPredicates.onType(Class).since 7.0 in favor ofReflectionHintsPredicates.onMethodInvocation(Method)orReflectionHintsPredicates.onType(Class).since 7.0 in favor ofReflectionHintsPredicates.onMethodInvocation(String, String)orReflectionHintsPredicates.onType(Class).no longer used by ASM.this method is superseded byClassWriter.newHandle(int, String, String, String, boolean).following the deprecation ofClass.newInstance()in JDK 9as of 6.1, in favor of implicit post-processing throughAutowireCapableBeanFactory.initializeBean(Object, String)as of 6.1, in favor of implicit post-processing throughAutowireCapableBeanFactory.initializeBean(Object, String)in favor ofAutowireCapableBeanFactory.createBean(Class)as of 6.2, in favor of lenient singleton locking (with this method returning an arbitrary object to lock on)in favor ofRegisteredBean.resolveInstantiationDescriptor()Only to keep backward compatibility.as of 7.0, always relying on@Beanunique methods, just possibly withOptional/ObjectProviderargumentssince it is superseded by theMergedAnnotationsAPIsince it is superseded by theMergedAnnotationsAPIsince it is superseded by theMergedAnnotationsAPIsince it is superseded by theMergedAnnotationsAPIsince it is superseded by theMergedAnnotationsAPIsince it is superseded by theMergedAnnotationsAPIsince it is superseded by theMergedAnnotationsAPIsince it is superseded by theMergedAnnotationsAPIsince it is superseded by theMergedAnnotationsAPIsince it is superseded by theMergedAnnotationsAPIas of Spring Framework 7.0, in favor ofRepeatableContainers.plus(Class, Class)as of Spring Framework 7.0, in favor ofRepeatableContainers.explicitRepeatable(Class, Class)in favor of implementingDecoder.decode(DataBuffer, ResolvableType, MimeType, Map)insteadin favor ofmethodParameter.withContainingClass(implementationClass).getParameterType()as of 6.0, in favor ofDataBuffer.toByteBuffer(ByteBuffer),DataBuffer.readableByteBuffers()orDataBuffer.writableByteBuffers()as of 6.0, in favor ofDataBuffer.toByteBuffer(int, ByteBuffer, int, int),DataBuffer.readableByteBuffers()orDataBuffer.writableByteBuffers()as of 6.0, in favor ofDataBuffer.ensureWritable(int)which has different semanticssince 6.0, in favor ofDataBuffer.ensureWritable(int)as of 6.0, in favor ofDataBuffer.split(int)which has different semanticsas of 6.0, in favor ofDataBuffer.split(int)which has different semanticsas of 6.0.5, in favor ofDataBuffer.toByteBuffer(ByteBuffer)as of 6.0.5, in favor ofDataBuffer.toByteBuffer(int, ByteBuffer, int, int)as of 6.0, in favor ofDataBufferFactory.allocateBuffer(int)as of 6.0 in favor ofSpringFactoriesLoader.load(Class, ArgumentResolver, FailureHandler)in favor of retaining the original MethodParameter and usingMethodParameter.nested(Integer)if nesting is requiredin favor ofMethodParameter.forExecutable(Executable, int)in favor ofMethodParameter.nested(Integer)in favor ofMethodParameter.withTypeIndex(int)as of 6.0, in favor of custom exception messages with selective inclusion of cause messagessince the common executors do not support start timeoutsas of 6.2, in favor ofCodeFlow.generateCodeForArgument(MethodVisitor, SpelNode, String)as of 6.2, in favor ofSpelNodeImpl.generateCodeForArguments(MethodVisitor, CodeFlow, Executable, SpelNodeImpl[])This method is provided for backward compatibility with APIs that would only accept maps. Generally avoid using HttpHeaders as a Map or MultiValueMap.in favor ofHttpHeaders.toSingleValueMap()which performs a copy but ensures that collection-iterating methods likeentrySet()are case-insensitivesince 7.0 in favor ofResponseEntity.unprocessableContent()as of 5.3.29, in favor ofSQLWarningException.getSQLWarning()in favor of the JDBC 4.0 connection validationin favor ofJdbcUtils.extractDatabaseMetaData(DataSource, DatabaseMetaDataCallback)with a lambda expression or method reference and a generically typed resultas of 6.1, in favor ofAbstractFallbackSQLExceptionTranslator.setCustomTranslator(SQLExceptionTranslator)as of 6.1, in favor of the"autodetect" flagas of 6.1, in favor of the"autodetect" flagin favor ofRSocketRequester.Builder.tcp(String, int)in favor ofRSocketRequester.Builder.websocket(URI)in favor of directThreadPoolTaskScheduler.getScheduledThreadPoolExecutor()accessas of 6.0, in favor ofIntervalTask.getInitialDelayDuration()as of 6.0, in favor ofIntervalTask.getIntervalDuration()as of 6.0, in favor ofScheduledTaskRegistrar.addFixedDelayTask(Runnable, Duration)as of 6.0, in favor ofScheduledTaskRegistrar.addFixedRateTask(Runnable, Duration)as of 6.0, in favor onPeriodicTrigger.getInitialDelayDuration()as of 6.0, in favor onPeriodicTrigger.getPeriodDuration()as of 6.0, with no direct replacementas of 6.0, in favor ofPeriodicTrigger.setInitialDelay(Duration)as of 6.0, in favor ofSimpleTriggerContext.update(Instant, Instant, Instant)as of 6.0, in favor ofTaskScheduler.schedule(Runnable, Instant)as of 6.0, in favor ofTaskScheduler.scheduleAtFixedRate(Runnable, Duration)as of 6.0, in favor ofTaskScheduler.scheduleAtFixedRate(Runnable, Instant, Duration)as of 6.0, in favor ofTaskScheduler.scheduleWithFixedDelay(Runnable, Duration)as of 6.0, in favor ofTaskScheduler.scheduleWithFixedDelay(Runnable, Instant, Duration)as of 6.0, in favor ofTrigger.nextExecution(TriggerContext)as of 6.0, in favor onTriggerContext.lastActualExecution()as of 6.0, in favor onTriggerContext.lastCompletion()as of 6.0, in favor onTriggerContext.lastScheduledExecution()as of Spring Framework 6.2.4, in favor ofAotContextLoader.loadContextForAotProcessing(MergedContextConfiguration, RuntimeHints); to be removed in Spring Framework 8.0since Spring Framework 7.0 in favor ofContextCache.put(MergedContextConfiguration, LoadFunction)as of Spring Framework 6.0, in favor of methods defined in theSmartContextLoaderSPIas of Spring Framework 6.0, in favor of methods defined in theSmartContextLoaderSPIsince 6.1 in favor ofMergedContextConfiguration.getPropertySourceDescriptors()as of Spring Framework 6.2.4, in favor ofAbstractDelegatingSmartContextLoader.loadContextForAotProcessing(MergedContextConfiguration, RuntimeHints); to be removed in Spring Framework 8.0as of Spring Framework 6.0, in favor ofAbstractGenericContextLoader.loadContext(MergedContextConfiguration)as of Spring Framework 6.2.4, in favor ofAbstractGenericContextLoader.loadContextForAotProcessing(MergedContextConfiguration, RuntimeHints); to be removed in Spring Framework 8.0as of 6.2.13, in favor ofTestConstructorUtils.isAutowirableConstructor(Executable, PropertyProvider); to be removed in Spring Framework 7.1as of 6.2.13, in favor ofTestConstructorUtils.isAutowirableConstructor(Executable, PropertyProvider); to be removed in Spring Framework 7.1as of 6.2.13, in favor ofTestConstructorUtils.isAutowirableConstructor(Executable, PropertyProvider); to be removed in Spring Framework 7.1as of 6.2.13, in favor ofTestConstructorUtils.isAutowirableConstructor(Executable, PropertyProvider); to be removed in Spring Framework 7.1as of Spring Framework 6.2.4, in favor ofAbstractGenericWebContextLoader.loadContextForAotProcessing(MergedContextConfiguration, RuntimeHints); to be removed in Spring Framework 8.0in favor ofMockMvcRequestBuilders.request(HttpMethod, URI)since 7.0, since this is now unassignedsince 7.0, this was marked as unused in RFC 9110since 7.0, this is now marked as "historic" and not endorsed by a standards body.since 7.0 in favor ofStatusResultMatchers.isContentTooLarge()since 7.0, removed from WebDAV specificationsince 7.0 in favor ofStatusResultMatchers.isUnprocessableContent()use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.in favor of custom (possibly narrower) checks such as for a Spring AOP proxyin favor of custom (possibly narrower) checks or simply a check for containingClassUtils.CGLIB_CLASS_SEPARATORin favor of custom (possibly narrower) checks or simply a check for containingClassUtils.CGLIB_CLASS_SEPARATORin favor ofConcurrentLruCache.capacity()as of 6.0.as of 6.1 in favor ofArrays.hashCode(boolean[])as of 6.1 in favor ofArrays.hashCode(byte[])as of 6.1 in favor ofArrays.hashCode(char[])as of 6.1 in favor ofArrays.hashCode(double[])as of 6.1 in favor ofArrays.hashCode(float[])as of 6.1 in favor ofArrays.hashCode(int[])as of 6.1 in favor ofArrays.hashCode(long[])as of 6.1 in favor ofArrays.hashCode(short[])as of 6.1 in favor ofArrays.hashCode(Object[])This utility uses Java Object Serialization, which allows arbitrary code to be run and is known for being the source of many Remote Code Execution (RCE) vulnerabilities.Prefer the use of an external tool (that serializes to JSON, XML, or any other format) which is regularly checked and updated for not allowing RCE.
as of 6.1, in favor ofStopWatch.lastTaskInfo()as of 6.1, in favor ofStopWatch.lastTaskInfo()as of 6.1, in favor ofStopWatch.lastTaskInfo()as of 6.1, in favor ofStopWatch.lastTaskInfo()as of 6.0 in favor ofInputStream.nullInputStream()in favor ofStringUtils.hasLength(String)andStringUtils.hasText(String)(orObjectUtils.isEmpty(Object))since 6.0, in favor ofString.stripLeading()since 6.0, in favor ofString.stripTrailing()since 6.0, in favor ofString.strip()since 7.0 in favor ofRestClient.Builder.configureMessageConverters(Consumer)since 7.0 in favor ofRestClient.Builder.configureMessageConverters(Consumer)use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.as of 5.3 in favor of usingUrlBasedCorsConfigurationSource.setUrlPathHelper(UrlPathHelper), if at all. For further details, please seeUrlBasedCorsConfigurationSource.setAllowInitLookupPath(boolean).use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.as of 5.3 in favor of usingUrlBasedCorsConfigurationSource.setUrlPathHelper(UrlPathHelper), if at all. For further details, please seeUrlBasedCorsConfigurationSource.setAllowInitLookupPath(boolean).as of 5.3 in favor of usingUrlBasedCorsConfigurationSource.setUrlPathHelper(UrlPathHelper), if at all. For further details, please seeUrlBasedCorsConfigurationSource.setAllowInitLookupPath(boolean).use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.without replacement to discourage use of path extensions for request mapping and for content negotiation (with similar deprecations and removals already applied to annotated controllers). For further context, please read issue #24179without replacement to discourage use of path extensions for request mapping and for content negotiation (with similar deprecations and removals already applied to annotated controllers). For further context, please read issue #24179without replacement to discourage use of path extensions for request mapping and for content negotiation (with similar deprecations and removals already applied to annotated controllers). For further context, please read issue #24179since 7.0 in favor ofServerResponse.unprocessableContent()use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcheris deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcheris deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcheris deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.since 7.0 in favor ofWebMvcConfigurationSupport.createMessageConverters()use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.since 7.0 in favor of configuring converters onWebMvcConfigurer.configureMessageConverters(HttpMessageConverters.ServerBuilder)since 7.0 in favor of configuring converters onWebMvcConfigurer.configureMessageConverters(HttpMessageConverters.ServerBuilder)without replacement to discourage use of path extensions for request mapping and for content negotiation (with similar deprecations and removals already applied to annotated controllers). For further context, please read issue #24179without replacement to discourage use of path extensions for request mapping and for content negotiation (with similar deprecations and removals already applied to annotated controllers). For further context, please read issue #24179without replacement to discourage use of path extensions for request mapping and for content negotiation (with similar deprecations and removals already applied to annotated controllers). For further context, please read issue #24179since 7.0 in favor ofServerResponse.unprocessableContent()use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.as of 6.0, in favor of usingAbstractHandlerMapping.setUrlPathHelper(UrlPathHelper)use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.as of 6.0, in favor of usingAbstractHandlerMapping.setUrlPathHelper(UrlPathHelper)as of 6.0, in favor of usingAbstractHandlerMapping.setUrlPathHelper(UrlPathHelper)use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.the path is resolved externally and obtained withServletRequestPathUtils.getCachedPathValue(ServletRequest); this method always returnsUrlPathHelper.defaultInstance.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.the path is resolved externally and obtained withServletRequestPathUtils.getCachedPathValue(ServletRequest)use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.the path is resolved externally and obtained withServletRequestPathUtils.getCachedPathValue(ServletRequest)use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.the path is resolved externally and obtained withServletRequestPathUtils.getCachedPathValue(ServletRequest)the path is resolved externally and obtained withServletRequestPathUtils.getCachedPathValue(ServletRequest)use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules. After the deprecation phase, it will no longer be possible to set a customized PathMatcher instance.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules. After the deprecation phase, it will no longer be possible to set a customized PathMatcher instance.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules. After the deprecation phase, it will no longer be possible to set a customized PathMatcher instance.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules. After the deprecation phase, it will no longer be possible to set a customized PathMatcher instance.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.
-
Deprecated ConstructorsConstructorDescriptionthis constructor has been superseded by
Handle(int, String, String, String, boolean).as of 6.0.11, in favor of an extraRootBeanDefinition.setTargetType(ResolvableType)callin favor of the factory methodAnnotationMetadata.introspect(Class)in favor of the factory methodAnnotationMetadata.introspect(Class). UseMergedAnnotation.asMapfromStandardAnnotationMetadata.getAnnotations()rather thanAnnotatedTypeMetadata.getAnnotationAttributes(String)ifnestedAnnotationsAsMapisfalsein favor ofStandardAnnotationMetadatain favor of obtaining instances viaAnnotationMetadataas of Spring Framework 5.2.23 in favor of invokingOperatorMatches(ConcurrentMap, int, int, SpelNodeImpl...)with a shared pattern cache insteadin favor ofHttpEntity(Object, HttpHeaders)in favor ofHttpEntity(HttpHeaders)in favor ofRequestEntity(HttpHeaders, HttpMethod, URI)in favor ofResponseEntity(Object, HttpHeaders, int)in favor ofResponseEntity(HttpHeaders, HttpStatusCode)in favor ofConcurrentTaskExecutor(Executor)with an externally provided Executorin favor ofConcurrentTaskScheduler(ScheduledExecutorService)with an externally provided Executoras of 6.0, in favor onFixedDelayTask(Runnable, Duration, Duration)as of 6.0, in favor onFixedRateTask(Runnable, Duration, Duration)as of 6.0, in favor onIntervalTask(Runnable, Duration)as of 6.0, in favor onIntervalTask(Runnable, Duration, Duration)as of 6.0, in favor onPeriodicTrigger(Duration)as of 6.0, in favor onPeriodicTrigger(Duration)as of 6.0, in favor ofSimpleTriggerContext(Instant, Instant, Instant)As of Spring Framework 6.2.6, in favor ofBeanOverrideHandler(Field, ResolvableType, String, String, BeanOverrideStrategy)in favor of callingString.formatted(Object...)upfrontas of 6.0.12 since JTA 1.1+ requires implicit rollback-only setting in case of an exception thrown inbeforeCompletion, so the regularSpringJtaSynchronizationAdapter(TransactionSynchronization)constructor is sufficient for all scenariosas of 6.0.12 since JTA 1.1+ requires implicit rollback-only setting in case of an exception thrown inbeforeCompletion, so the regularSpringJtaSynchronizationAdapter(TransactionSynchronization)constructor is sufficient for all scenariosin favor of the constructor variant with HTTP methodsuse ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.in favor usingRequestMappingInfo.BuilderviaRequestMappingInfo.paths(String...).in favor usingRequestMappingInfo.BuilderviaRequestMappingInfo.paths(String...).since 5.3 in favor of usingRequestMappingInfo.addCustomCondition(RequestCondition).
-
Deprecated Enum ConstantsEnum ConstantDescriptionwith no replacement since introspection is included when
adding a reflection hint for a type.with no replacement since introspection is included whenadding a reflection hint for a type.in favor ofMemberCategory.ACCESS_DECLARED_FIELDSwith similar semantics.with no replacement since introspection is included whenadding a reflection hint for a type.with no replacement since introspection is added by default whenadding a reflection hint for a type.with no replacement since introspection is included whenadding a reflection hint for a type.with no replacement since introspection is added by default whenadding a reflection hint for a type.with no replacement since introspection is included whenadding a reflection hint for a type.in favor ofMemberCategory.ACCESS_PUBLIC_FIELDSwith similar semantics.since 7.0, this is now unassignedsince 7.0, marked as unused in RFC 9110since 7.0, this is now marked as "historic" and not endorsed by a standards body.since 7.0 in favor ofHttpStatus.CONTENT_TOO_LARGEsince 7.0, removed from WebDAV specificationsince 7.0 in favor ofHttpStatus.UNPROCESSABLE_CONTENT
-
Deprecated Annotation Interface ElementsAnnotation Interface ElementDescriptionas of 7.0, always relying on
@Beanunique methods, just possibly withOptional/ObjectProviderarguments