diff --git a/spring-beans/src/main/java/org/springframework/beans/BeanUtils.java b/spring-beans/src/main/java/org/springframework/beans/BeanUtils.java index 0da9c8fd525f..3c76cccf16bf 100644 --- a/spring-beans/src/main/java/org/springframework/beans/BeanUtils.java +++ b/spring-beans/src/main/java/org/springframework/beans/BeanUtils.java @@ -97,7 +97,7 @@ public abstract class BeanUtils { * @deprecated as of Spring 5.0, following the deprecation of * {@link Class#newInstance()} in JDK 9 */ - @Deprecated + @Deprecated(since = "5.0") public static T instantiate(Class clazz) throws BeanInstantiationException { Assert.notNull(clazz, "Class must not be null"); if (clazz.isInterface()) { diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/AutowireCapableBeanFactory.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/AutowireCapableBeanFactory.java index 46dff4eab47c..57c62202da71 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/AutowireCapableBeanFactory.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/AutowireCapableBeanFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2023 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -100,7 +100,7 @@ public interface AutowireCapableBeanFactory extends BeanFactory { * @deprecated as of Spring 3.0: If you are using mixed autowiring strategies, * prefer annotation-based autowiring for clearer demarcation of autowiring needs. */ - @Deprecated + @Deprecated(since = "3.0") int AUTOWIRE_AUTODETECT = 4; /** diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractAutowireCapableBeanFactory.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractAutowireCapableBeanFactory.java index 2fb38f5b8f51..bdd1e9f8361b 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractAutowireCapableBeanFactory.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractAutowireCapableBeanFactory.java @@ -363,7 +363,7 @@ public Object configureBean(Object existingBean, String beanName) throws BeansEx // Specialized methods for fine-grained control over the bean lifecycle //------------------------------------------------------------------------- - @Deprecated + @Deprecated(since = "6.1") @Override public Object createBean(Class beanClass, int autowireMode, boolean dependencyCheck) throws BeansException { // Use non-singleton bean definition, to avoid registering bean as dependent bean. diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanDefinition.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanDefinition.java index 2a8a44e3268f..30f093fa8efe 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanDefinition.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanDefinition.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2024 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -98,7 +98,7 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess * @deprecated as of Spring 3.0: If you are using mixed autowiring strategies, * use annotation-based autowiring for clearer demarcation of autowiring needs. */ - @Deprecated + @Deprecated(since = "3.0") public static final int AUTOWIRE_AUTODETECT = AutowireCapableBeanFactory.AUTOWIRE_AUTODETECT; /** diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/PropertiesBeanDefinitionReader.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/PropertiesBeanDefinitionReader.java index 339512acc621..906a659cac3e 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/PropertiesBeanDefinitionReader.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/PropertiesBeanDefinitionReader.java @@ -78,7 +78,7 @@ * @deprecated as of 5.3, in favor of Spring's common bean definition formats * and/or custom reader implementations */ -@Deprecated +@Deprecated(since = "5.3") public class PropertiesBeanDefinitionReader extends AbstractBeanDefinitionReader { /** diff --git a/spring-context/src/main/java/org/springframework/context/support/AbstractResourceBasedMessageSource.java b/spring-context/src/main/java/org/springframework/context/support/AbstractResourceBasedMessageSource.java index 45dafd462d11..e34bd3b53fc2 100644 --- a/spring-context/src/main/java/org/springframework/context/support/AbstractResourceBasedMessageSource.java +++ b/spring-context/src/main/java/org/springframework/context/support/AbstractResourceBasedMessageSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2024 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -158,7 +158,7 @@ public void setFallbackToSystemLocale(boolean fallbackToSystemLocale) { * @since 4.3 * @deprecated as of 5.2.2, in favor of {@link #getDefaultLocale()} */ - @Deprecated + @Deprecated(since = "5.2.2") protected boolean isFallbackToSystemLocale() { return this.fallbackToSystemLocale; } diff --git a/spring-context/src/main/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurer.java b/spring-context/src/main/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurer.java index 4ee1eb73acd0..bac99cf569fe 100644 --- a/spring-context/src/main/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurer.java +++ b/spring-context/src/main/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurer.java @@ -198,7 +198,7 @@ protected void processProperties(ConfigurableListableBeanFactory beanFactoryToPr * {@link #processProperties(ConfigurableListableBeanFactory, ConfigurablePropertyResolver)} */ @Override - @Deprecated + @Deprecated(since = "3.1") protected void processProperties(ConfigurableListableBeanFactory beanFactory, Properties props) { throw new UnsupportedOperationException( "Call processProperties(ConfigurableListableBeanFactory, ConfigurablePropertyResolver) instead"); diff --git a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ConcurrentTaskExecutor.java b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ConcurrentTaskExecutor.java index 322ced233ae9..a11ca7d04a00 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ConcurrentTaskExecutor.java +++ b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ConcurrentTaskExecutor.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2024 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -153,7 +153,7 @@ public void execute(Runnable task) { this.adaptedExecutor.execute(task); } - @Deprecated + @Deprecated(since = "5.3.16") @Override public void execute(Runnable task, long startTimeout) { this.adaptedExecutor.execute(task, startTimeout); diff --git a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolTaskScheduler.java b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolTaskScheduler.java index b0d754cc670c..e97afc81ee79 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolTaskScheduler.java +++ b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolTaskScheduler.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2024 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -302,7 +302,7 @@ public int getActiveCount() { * @deprecated as of 5.3.9, in favor of direct * {@link #getScheduledThreadPoolExecutor()} access */ - @Deprecated + @Deprecated(since = "5.3.9") public boolean isRemoveOnCancelPolicy() { if (this.scheduledExecutor == null) { // Not initialized yet: return our setting for the time being. diff --git a/spring-core/src/main/java/org/springframework/core/GenericTypeResolver.java b/spring-core/src/main/java/org/springframework/core/GenericTypeResolver.java index 8213565599fa..311ebe05aabd 100644 --- a/spring-core/src/main/java/org/springframework/core/GenericTypeResolver.java +++ b/spring-core/src/main/java/org/springframework/core/GenericTypeResolver.java @@ -61,7 +61,7 @@ private GenericTypeResolver() { * @return the corresponding generic parameter or return type * @deprecated since 5.2 in favor of {@code methodParameter.withContainingClass(implementationClass).getParameterType()} */ - @Deprecated + @Deprecated(since = "5.2") public static Class resolveParameterType(MethodParameter methodParameter, Class implementationClass) { Assert.notNull(methodParameter, "MethodParameter must not be null"); Assert.notNull(implementationClass, "Class must not be null"); diff --git a/spring-core/src/main/java/org/springframework/core/MethodParameter.java b/spring-core/src/main/java/org/springframework/core/MethodParameter.java index 8070c7b21607..c2b69eeef3e3 100644 --- a/spring-core/src/main/java/org/springframework/core/MethodParameter.java +++ b/spring-core/src/main/java/org/springframework/core/MethodParameter.java @@ -266,7 +266,7 @@ public int getParameterIndex() { * @see #getNestingLevel() * @deprecated since 5.2 in favor of {@link #nested(Integer)} */ - @Deprecated + @Deprecated(since = "5.2") public void increaseNestingLevel() { this.nestingLevel++; } @@ -277,7 +277,7 @@ public void increaseNestingLevel() { * @deprecated since 5.2 in favor of retaining the original MethodParameter and * using {@link #nested(Integer)} if nesting is required */ - @Deprecated + @Deprecated(since = "5.2") public void decreaseNestingLevel() { getTypeIndexesPerLevel().remove(this.nestingLevel); this.nestingLevel--; @@ -309,7 +309,7 @@ public MethodParameter withTypeIndex(int typeIndex) { * @see #getNestingLevel() * @deprecated since 5.2 in favor of {@link #withTypeIndex} */ - @Deprecated + @Deprecated(since = "5.2") public void setTypeIndexForCurrentLevel(int typeIndex) { getTypeIndexesPerLevel().put(this.nestingLevel, typeIndex); } @@ -429,7 +429,7 @@ public MethodParameter withContainingClass(@Nullable Class containingClass) { /** * Set a containing class to resolve the parameter type against. */ - @Deprecated + @Deprecated(since = "5.2") void setContainingClass(Class containingClass) { this.containingClass = containingClass; this.parameterType = null; @@ -449,7 +449,7 @@ public Class getContainingClass() { /** * Set a resolved (generic) parameter type. */ - @Deprecated + @Deprecated(since = "5.2") void setParameterType(@Nullable Class parameterType) { this.parameterType = parameterType; } @@ -760,7 +760,7 @@ public MethodParameter clone() { * @return the corresponding MethodParameter instance * @deprecated as of 5.0, in favor of {@link #forExecutable} */ - @Deprecated + @Deprecated(since = "5.0") public static MethodParameter forMethodOrConstructor(Object methodOrConstructor, int parameterIndex) { if (!(methodOrConstructor instanceof Executable executable)) { throw new IllegalArgumentException( diff --git a/spring-core/src/main/java/org/springframework/core/annotation/AnnotationFilter.java b/spring-core/src/main/java/org/springframework/core/annotation/AnnotationFilter.java index 9b5e4ecd2f94..06fd286048cd 100644 --- a/spring-core/src/main/java/org/springframework/core/annotation/AnnotationFilter.java +++ b/spring-core/src/main/java/org/springframework/core/annotation/AnnotationFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2021 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -79,7 +79,7 @@ public String toString() { * always ignores lang annotations according to the {@link #PLAIN} filter * (for efficiency reasons) */ - @Deprecated + @Deprecated(since = "5.2.6") AnnotationFilter NONE = new AnnotationFilter() { @Override public boolean matches(Annotation annotation) { diff --git a/spring-core/src/main/java/org/springframework/core/annotation/AnnotationUtils.java b/spring-core/src/main/java/org/springframework/core/annotation/AnnotationUtils.java index 862cadbf0ee2..b864cb33ce44 100644 --- a/spring-core/src/main/java/org/springframework/core/annotation/AnnotationUtils.java +++ b/spring-core/src/main/java/org/springframework/core/annotation/AnnotationUtils.java @@ -265,7 +265,7 @@ private static boolean isSingleLevelPresent(MergedAnnotat * @see AnnotatedElement#getAnnotations() * @deprecated as of 5.2 since it is superseded by the {@link MergedAnnotations} API */ - @Deprecated + @Deprecated(since = "5.2") public static Annotation @Nullable [] getAnnotations(AnnotatedElement annotatedElement) { try { return synthesizeAnnotationArray(annotatedElement.getAnnotations(), annotatedElement); @@ -289,7 +289,7 @@ private static boolean isSingleLevelPresent(MergedAnnotat * @see AnnotatedElement#getAnnotations() * @deprecated as of 5.2 since it is superseded by the {@link MergedAnnotations} API */ - @Deprecated + @Deprecated(since = "5.2") public static Annotation @Nullable [] getAnnotations(Method method) { try { return synthesizeAnnotationArray(BridgeMethodResolver.findBridgedMethod(method).getAnnotations(), method); @@ -328,7 +328,7 @@ private static boolean isSingleLevelPresent(MergedAnnotat * @see java.lang.reflect.AnnotatedElement#getAnnotationsByType * @deprecated as of 5.2 since it is superseded by the {@link MergedAnnotations} API */ - @Deprecated + @Deprecated(since = "5.2") public static Set getRepeatableAnnotations(AnnotatedElement annotatedElement, Class annotationType) { @@ -365,7 +365,7 @@ public static Set getRepeatableAnnotations(AnnotatedEl * @see java.lang.reflect.AnnotatedElement#getAnnotationsByType * @deprecated as of 5.2 since it is superseded by the {@link MergedAnnotations} API */ - @Deprecated + @Deprecated(since = "5.2") public static Set getRepeatableAnnotations(AnnotatedElement annotatedElement, Class annotationType, @Nullable Class containerAnnotationType) { @@ -409,7 +409,7 @@ public static Set getRepeatableAnnotations(AnnotatedEl * @see java.lang.reflect.AnnotatedElement#getDeclaredAnnotationsByType * @deprecated as of 5.2 since it is superseded by the {@link MergedAnnotations} API */ - @Deprecated + @Deprecated(since = "5.2") public static Set getDeclaredRepeatableAnnotations(AnnotatedElement annotatedElement, Class annotationType) { @@ -446,7 +446,7 @@ public static Set getDeclaredRepeatableAnnotations(Ann * @see java.lang.reflect.AnnotatedElement#getDeclaredAnnotationsByType * @deprecated as of 5.2 since it is superseded by the {@link MergedAnnotations} API */ - @Deprecated + @Deprecated(since = "5.2") public static Set getDeclaredRepeatableAnnotations(AnnotatedElement annotatedElement, Class annotationType, @Nullable Class containerAnnotationType) { @@ -597,7 +597,7 @@ public static Set getDeclaredRepeatableAnnotations(Ann * @see Class#getDeclaredAnnotations() * @deprecated as of 5.2 since it is superseded by the {@link MergedAnnotations} API */ - @Deprecated + @Deprecated(since = "5.2") public static @Nullable Class findAnnotationDeclaringClass( Class annotationType, @Nullable Class clazz) { @@ -633,7 +633,7 @@ public static Set getDeclaredRepeatableAnnotations(Ann * @see Class#getDeclaredAnnotations() * @deprecated as of 5.2 since it is superseded by the {@link MergedAnnotations} API */ - @Deprecated + @Deprecated(since = "5.2") public static @Nullable Class findAnnotationDeclaringClassForTypes( List> annotationTypes, @Nullable Class clazz) { @@ -686,7 +686,7 @@ public static boolean isAnnotationDeclaredLocally(Class an * @see #isAnnotationDeclaredLocally(Class, Class) * @deprecated as of 5.2 since it is superseded by the {@link MergedAnnotations} API */ - @Deprecated + @Deprecated(since = "5.2") public static boolean isAnnotationInherited(Class annotationType, Class clazz) { return MergedAnnotations.from(clazz, SearchStrategy.INHERITED_ANNOTATIONS) .stream(annotationType) @@ -704,7 +704,7 @@ public static boolean isAnnotationInherited(Class annotati * @since 4.2.1 * @deprecated as of 5.2 since it is superseded by the {@link MergedAnnotations} API */ - @Deprecated + @Deprecated(since = "5.2") public static boolean isAnnotationMetaPresent(Class annotationType, @Nullable Class metaAnnotationType) { diff --git a/spring-core/src/main/java/org/springframework/core/codec/AbstractDataBufferDecoder.java b/spring-core/src/main/java/org/springframework/core/codec/AbstractDataBufferDecoder.java index 7db7d427eb40..e1076c394c5d 100644 --- a/spring-core/src/main/java/org/springframework/core/codec/AbstractDataBufferDecoder.java +++ b/spring-core/src/main/java/org/springframework/core/codec/AbstractDataBufferDecoder.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2023 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -100,7 +100,7 @@ public Mono decodeToMono(Publisher input, ResolvableType elementT * @deprecated as of 5.2, please implement * {@link #decode(DataBuffer, ResolvableType, MimeType, Map)} instead */ - @Deprecated + @Deprecated(since = "5.2") protected @Nullable T decodeDataBuffer(DataBuffer buffer, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map hints) { diff --git a/spring-core/src/main/java/org/springframework/core/env/AbstractEnvironment.java b/spring-core/src/main/java/org/springframework/core/env/AbstractEnvironment.java index 2f3c180fde5c..21a2d528cffc 100644 --- a/spring-core/src/main/java/org/springframework/core/env/AbstractEnvironment.java +++ b/spring-core/src/main/java/org/springframework/core/env/AbstractEnvironment.java @@ -377,7 +377,7 @@ public void setDefaultProfiles(String... profiles) { } @Override - @Deprecated + @Deprecated(since = "5.1") public boolean acceptsProfiles(String... profiles) { Assert.notEmpty(profiles, "Must specify at least one profile"); for (String profile : profiles) { diff --git a/spring-core/src/main/java/org/springframework/core/env/Environment.java b/spring-core/src/main/java/org/springframework/core/env/Environment.java index bf83d4e7f941..b420faa05960 100644 --- a/spring-core/src/main/java/org/springframework/core/env/Environment.java +++ b/spring-core/src/main/java/org/springframework/core/env/Environment.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2023 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -133,7 +133,7 @@ default boolean matchesProfiles(String... profileExpressions) { * @deprecated as of 5.1 in favor of {@link #acceptsProfiles(Profiles)} or * {@link #matchesProfiles(String...)} */ - @Deprecated + @Deprecated(since = "5.1") boolean acceptsProfiles(String... profiles); /** diff --git a/spring-core/src/main/java/org/springframework/core/task/AsyncTaskExecutor.java b/spring-core/src/main/java/org/springframework/core/task/AsyncTaskExecutor.java index 39cc0b5cb651..9352da490283 100644 --- a/spring-core/src/main/java/org/springframework/core/task/AsyncTaskExecutor.java +++ b/spring-core/src/main/java/org/springframework/core/task/AsyncTaskExecutor.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2023 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -48,14 +48,14 @@ public interface AsyncTaskExecutor extends TaskExecutor { * Constant that indicates immediate execution. * @deprecated as of 5.3.16 along with {@link #execute(Runnable, long)} */ - @Deprecated + @Deprecated(since = "5.3.16") long TIMEOUT_IMMEDIATE = 0; /** * Constant that indicates no time limit. * @deprecated as of 5.3.16 along with {@link #execute(Runnable, long)} */ - @Deprecated + @Deprecated(since = "5.3.16") long TIMEOUT_INDEFINITE = Long.MAX_VALUE; @@ -74,7 +74,7 @@ public interface AsyncTaskExecutor extends TaskExecutor { * @see #execute(Runnable) * @deprecated as of 5.3.16 since the common executors do not support start timeouts */ - @Deprecated + @Deprecated(since = "5.3.16") default void execute(Runnable task, long startTimeout) { execute(task); } diff --git a/spring-core/src/main/java/org/springframework/core/task/SimpleAsyncTaskExecutor.java b/spring-core/src/main/java/org/springframework/core/task/SimpleAsyncTaskExecutor.java index 752a633fa57d..d34a6bf10780 100644 --- a/spring-core/src/main/java/org/springframework/core/task/SimpleAsyncTaskExecutor.java +++ b/spring-core/src/main/java/org/springframework/core/task/SimpleAsyncTaskExecutor.java @@ -264,7 +264,7 @@ public void execute(Runnable task) { * @see #TIMEOUT_IMMEDIATE * @see #doExecute(Runnable) */ - @Deprecated + @Deprecated(since = "5.3.16") @Override public void execute(Runnable task, long startTimeout) { Assert.notNull(task, "Runnable must not be null"); diff --git a/spring-core/src/main/java/org/springframework/core/task/TaskTimeoutException.java b/spring-core/src/main/java/org/springframework/core/task/TaskTimeoutException.java index ddec24acb697..5ce4d71c2f75 100644 --- a/spring-core/src/main/java/org/springframework/core/task/TaskTimeoutException.java +++ b/spring-core/src/main/java/org/springframework/core/task/TaskTimeoutException.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2022 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ * @see AsyncTaskExecutor#execute(Runnable, long) * @deprecated as of 5.3.16 since the common executors do not support start timeouts */ -@Deprecated +@Deprecated(since = "5.3.16") @SuppressWarnings("serial") public class TaskTimeoutException extends TaskRejectedException { diff --git a/spring-core/src/main/java/org/springframework/core/type/StandardAnnotationMetadata.java b/spring-core/src/main/java/org/springframework/core/type/StandardAnnotationMetadata.java index ec6064992c8d..acf541e8b836 100644 --- a/spring-core/src/main/java/org/springframework/core/type/StandardAnnotationMetadata.java +++ b/spring-core/src/main/java/org/springframework/core/type/StandardAnnotationMetadata.java @@ -60,7 +60,7 @@ public class StandardAnnotationMetadata extends StandardClassMetadata implements * @see #StandardAnnotationMetadata(Class, boolean) * @deprecated since 5.2 in favor of the factory method {@link AnnotationMetadata#introspect(Class)} */ - @Deprecated + @Deprecated(since = "5.2") public StandardAnnotationMetadata(Class introspectedClass) { this(introspectedClass, false); } @@ -80,7 +80,7 @@ public StandardAnnotationMetadata(Class introspectedClass) { * from {@link #getAnnotations()} rather than {@link #getAnnotationAttributes(String)} * if {@code nestedAnnotationsAsMap} is {@code false} */ - @Deprecated + @Deprecated(since = "5.2") public StandardAnnotationMetadata(Class introspectedClass, boolean nestedAnnotationsAsMap) { super(introspectedClass); this.mergedAnnotations = MergedAnnotations.from(introspectedClass, diff --git a/spring-core/src/main/java/org/springframework/core/type/StandardClassMetadata.java b/spring-core/src/main/java/org/springframework/core/type/StandardClassMetadata.java index 6e57d49c45ae..ba1e0de52fc8 100644 --- a/spring-core/src/main/java/org/springframework/core/type/StandardClassMetadata.java +++ b/spring-core/src/main/java/org/springframework/core/type/StandardClassMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2023 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,7 +42,7 @@ public class StandardClassMetadata implements ClassMetadata { * @param introspectedClass the Class to introspect * @deprecated since 5.2 in favor of {@link StandardAnnotationMetadata} */ - @Deprecated + @Deprecated(since = "5.2") public StandardClassMetadata(Class introspectedClass) { Assert.notNull(introspectedClass, "Class must not be null"); this.introspectedClass = introspectedClass; diff --git a/spring-core/src/main/java/org/springframework/core/type/StandardMethodMetadata.java b/spring-core/src/main/java/org/springframework/core/type/StandardMethodMetadata.java index 25ae1e1976d8..3def07d396a4 100644 --- a/spring-core/src/main/java/org/springframework/core/type/StandardMethodMetadata.java +++ b/spring-core/src/main/java/org/springframework/core/type/StandardMethodMetadata.java @@ -54,7 +54,7 @@ public class StandardMethodMetadata implements MethodMetadata { * @param introspectedMethod the Method to introspect * @deprecated since 5.2 in favor of obtaining instances via {@link AnnotationMetadata} */ - @Deprecated + @Deprecated(since = "5.2") public StandardMethodMetadata(Method introspectedMethod) { this(introspectedMethod, false); } diff --git a/spring-core/src/main/java/org/springframework/lang/NonNull.java b/spring-core/src/main/java/org/springframework/lang/NonNull.java index 393737c93d63..36a139caffca 100644 --- a/spring-core/src/main/java/org/springframework/lang/NonNull.java +++ b/spring-core/src/main/java/org/springframework/lang/NonNull.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2024 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -52,6 +52,6 @@ @Documented @Nonnull @TypeQualifierNickname -@Deprecated +@Deprecated(since = "7.0") public @interface NonNull { } diff --git a/spring-core/src/main/java/org/springframework/lang/NonNullApi.java b/spring-core/src/main/java/org/springframework/lang/NonNullApi.java index 720dc4704aa3..fbc5f0cacc14 100644 --- a/spring-core/src/main/java/org/springframework/lang/NonNullApi.java +++ b/spring-core/src/main/java/org/springframework/lang/NonNullApi.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2024 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -48,6 +48,6 @@ @Documented @Nonnull @TypeQualifierDefault({ElementType.METHOD, ElementType.PARAMETER}) -@Deprecated +@Deprecated(since = "7.0") public @interface NonNullApi { } diff --git a/spring-core/src/main/java/org/springframework/lang/NonNullFields.java b/spring-core/src/main/java/org/springframework/lang/NonNullFields.java index 2cb03e38b0b3..938e99f05638 100644 --- a/spring-core/src/main/java/org/springframework/lang/NonNullFields.java +++ b/spring-core/src/main/java/org/springframework/lang/NonNullFields.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2024 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,6 +47,6 @@ @Documented @Nonnull @TypeQualifierDefault(ElementType.FIELD) -@Deprecated +@Deprecated(since = "7.0") public @interface NonNullFields { } diff --git a/spring-core/src/main/java/org/springframework/lang/Nullable.java b/spring-core/src/main/java/org/springframework/lang/Nullable.java index 4b1b401cd7c6..1a74d42b9670 100644 --- a/spring-core/src/main/java/org/springframework/lang/Nullable.java +++ b/spring-core/src/main/java/org/springframework/lang/Nullable.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2024 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -52,6 +52,6 @@ @Documented @CheckForNull @TypeQualifierNickname -@Deprecated +@Deprecated(since = "7.0") public @interface Nullable { } diff --git a/spring-core/src/main/java/org/springframework/util/ClassUtils.java b/spring-core/src/main/java/org/springframework/util/ClassUtils.java index 34623b1fbead..0bc7b9d04481 100644 --- a/spring-core/src/main/java/org/springframework/util/ClassUtils.java +++ b/spring-core/src/main/java/org/springframework/util/ClassUtils.java @@ -942,7 +942,7 @@ public static boolean isLambdaClass(Class clazz) { * @deprecated as of 5.2, in favor of custom (possibly narrower) checks * such as for a Spring AOP proxy */ - @Deprecated + @Deprecated(since = "5.2") public static boolean isCglibProxy(Object object) { return isCglibProxyClass(object.getClass()); } @@ -954,7 +954,7 @@ public static boolean isCglibProxy(Object object) { * @deprecated as of 5.2, in favor of custom (possibly narrower) checks * or simply a check for containing {@link #CGLIB_CLASS_SEPARATOR} */ - @Deprecated + @Deprecated(since = "5.2") public static boolean isCglibProxyClass(@Nullable Class clazz) { return (clazz != null && isCglibProxyClassName(clazz.getName())); } @@ -966,7 +966,7 @@ public static boolean isCglibProxyClass(@Nullable Class clazz) { * @deprecated as of 5.2, in favor of custom (possibly narrower) checks * or simply a check for containing {@link #CGLIB_CLASS_SEPARATOR} */ - @Deprecated + @Deprecated(since = "5.2") public static boolean isCglibProxyClassName(@Nullable String className) { return (className != null && className.contains(CGLIB_CLASS_SEPARATOR)); } @@ -1388,7 +1388,7 @@ public static Method getMostSpecificMethod(Method method, @Nullable Class tar * @see #getPubliclyAccessibleMethodIfPossible(Method, Class) * @deprecated in favor of {@link #getInterfaceMethodIfPossible(Method, Class)} */ - @Deprecated + @Deprecated(since = "5.2") public static Method getInterfaceMethodIfPossible(Method method) { return getInterfaceMethodIfPossible(method, null); } diff --git a/spring-core/src/main/java/org/springframework/util/SerializationUtils.java b/spring-core/src/main/java/org/springframework/util/SerializationUtils.java index a8f34a790860..166472af39de 100644 --- a/spring-core/src/main/java/org/springframework/util/SerializationUtils.java +++ b/spring-core/src/main/java/org/springframework/util/SerializationUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2024 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -72,7 +72,7 @@ public abstract class SerializationUtils { *

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. */ - @Deprecated + @Deprecated(since = "6.0") public static @Nullable Object deserialize(byte @Nullable [] bytes) { if (bytes == null) { return null; diff --git a/spring-core/src/main/java/org/springframework/util/StringUtils.java b/spring-core/src/main/java/org/springframework/util/StringUtils.java index abfc9663cf3f..3d2040d2d964 100644 --- a/spring-core/src/main/java/org/springframework/util/StringUtils.java +++ b/spring-core/src/main/java/org/springframework/util/StringUtils.java @@ -108,7 +108,7 @@ public abstract class StringUtils { * @deprecated as of 5.3, in favor of {@link #hasLength(String)} and * {@link #hasText(String)} (or {@link ObjectUtils#isEmpty(Object)}) */ - @Deprecated + @Deprecated(since = "5.3") public static boolean isEmpty(@Nullable Object str) { return (str == null || "".equals(str)); } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcOperations.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcOperations.java index 94fd24f425af..1be5076cd8f2 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcOperations.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcOperations.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2024 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -369,7 +369,7 @@ public interface JdbcOperations { * @throws DataAccessException if the query fails * @deprecated as of 5.3, in favor of {@link #query(String, ResultSetExtractor, Object...)} */ - @Deprecated + @Deprecated(since = "5.3") @Nullable T query(String sql, @Nullable Object @Nullable [] args, ResultSetExtractor rse) throws DataAccessException; /** @@ -440,7 +440,7 @@ public interface JdbcOperations { * @throws DataAccessException if the query fails * @deprecated as of 5.3, in favor of {@link #query(String, RowCallbackHandler, Object...)} */ - @Deprecated + @Deprecated(since = "5.3") void query(String sql, @Nullable Object @Nullable [] args, RowCallbackHandler rch) throws DataAccessException; /** @@ -516,7 +516,7 @@ List query(String sql, @Nullable PreparedStatementSetter pss, RowMapper List query(String sql, @Nullable Object @Nullable [] args, RowMapper rowMapper) throws DataAccessException; /** @@ -623,7 +623,7 @@ Stream queryForStream(String sql, RowMapper rowMapper, @Nullable Objec * @throws DataAccessException if the query fails * @deprecated as of 5.3, in favor of {@link #queryForObject(String, RowMapper, Object...)} */ - @Deprecated + @Deprecated(since = "5.3") @Nullable T queryForObject(String sql, @Nullable Object @Nullable [] args, RowMapper rowMapper) throws DataAccessException; /** @@ -687,7 +687,7 @@ Stream queryForStream(String sql, RowMapper rowMapper, @Nullable Objec * @see #queryForObject(String, Class) * @deprecated as of 5.3, in favor of {@link #queryForObject(String, Class, Object...)} */ - @Deprecated + @Deprecated(since = "5.3") @Nullable T queryForObject(String sql, @Nullable Object @Nullable [] args, Class requiredType) throws DataAccessException; /** @@ -791,7 +791,7 @@ List queryForList(String sql, @Nullable Object @Nullable [] args, int[] a * @see SingleColumnRowMapper * @deprecated as of 5.3, in favor of {@link #queryForList(String, Class, Object...)} */ - @Deprecated + @Deprecated(since = "5.3") List queryForList(String sql, @Nullable Object @Nullable [] args, Class elementType) throws DataAccessException; /** diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcTemplate.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcTemplate.java index 1f987bfee944..227f494da158 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcTemplate.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcTemplate.java @@ -740,7 +740,7 @@ private String appendSql(@Nullable String sql, String statement) { return query(sql, newArgTypePreparedStatementSetter(args, argTypes), rse); } - @Deprecated + @Deprecated(since = "5.3") @Override public @Nullable T query(String sql, @Nullable Object @Nullable [] args, ResultSetExtractor rse) throws DataAccessException { return query(sql, newArgPreparedStatementSetter(args), rse); @@ -766,7 +766,7 @@ public void query(String sql, @Nullable Object @Nullable [] args, int[] argTypes query(sql, newArgTypePreparedStatementSetter(args, argTypes), rch); } - @Deprecated + @Deprecated(since = "5.3") @Override public void query(String sql, @Nullable Object @Nullable [] args, RowCallbackHandler rch) throws DataAccessException { query(sql, newArgPreparedStatementSetter(args), rch); @@ -792,7 +792,7 @@ public List query(String sql, @Nullable Object @Nullable [] args, int[] a return result(query(sql, args, argTypes, new RowMapperResultSetExtractor<>(rowMapper))); } - @Deprecated + @Deprecated(since = "5.3") @Override public List query(String sql, @Nullable Object @Nullable [] args, RowMapper rowMapper) throws DataAccessException { return result(query(sql, newArgPreparedStatementSetter(args), new RowMapperResultSetExtractor<>(rowMapper))); @@ -859,7 +859,7 @@ public Stream queryForStream(String sql, RowMapper rowMapper, @Nullabl return DataAccessUtils.nullableSingleResult(results); } - @Deprecated + @Deprecated(since = "5.3") @Override public @Nullable T queryForObject(String sql,@Nullable Object @Nullable [] args, RowMapper rowMapper) throws DataAccessException { List results = query(sql, newArgPreparedStatementSetter(args), new RowMapperResultSetExtractor<>(rowMapper, 1)); @@ -879,7 +879,7 @@ public Stream queryForStream(String sql, RowMapper rowMapper, @Nullabl return queryForObject(sql, args, argTypes, getSingleColumnRowMapper(requiredType)); } - @Deprecated + @Deprecated(since = "5.3") @Override public @Nullable T queryForObject(String sql, @Nullable Object @Nullable [] args, Class requiredType) throws DataAccessException { return queryForObject(sql, getSingleColumnRowMapper(requiredType), args); @@ -905,7 +905,7 @@ public List queryForList(String sql, @Nullable Object @Nullable [] args, return query(sql, args, argTypes, getSingleColumnRowMapper(elementType)); } - @Deprecated + @Deprecated(since = "5.3") @Override public List queryForList(String sql, @Nullable Object @Nullable [] args, Class elementType) throws DataAccessException { return query(sql, newArgPreparedStatementSetter(args), getSingleColumnRowMapper(elementType)); diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/JdbcBeanDefinitionReader.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/JdbcBeanDefinitionReader.java index c6db333402d6..fd2a4c7d4e14 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/JdbcBeanDefinitionReader.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/JdbcBeanDefinitionReader.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2020 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,7 +45,7 @@ * @deprecated as of 5.3, in favor of Spring's common bean definition formats * and/or custom reader implementations */ -@Deprecated +@Deprecated(since = "5.3") public class JdbcBeanDefinitionReader { private final org.springframework.beans.factory.support.PropertiesBeanDefinitionReader propReader; diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DataSourceUtils.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DataSourceUtils.java index b0bc446ecd8f..06b9cebf2329 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DataSourceUtils.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DataSourceUtils.java @@ -266,7 +266,7 @@ public static void resetConnectionAfterTransaction( * @deprecated as of 5.1.11, in favor of * {@link #resetConnectionAfterTransaction(Connection, Integer, boolean)} */ - @Deprecated + @Deprecated(since = "5.1.11") public static void resetConnectionAfterTransaction(Connection con, @Nullable Integer previousIsolationLevel) { Assert.notNull(con, "No Connection specified"); try { diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/DatabaseStartupValidator.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/DatabaseStartupValidator.java index 19cde00c58db..e4c2325b9045 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/DatabaseStartupValidator.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/DatabaseStartupValidator.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2020 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -77,7 +77,7 @@ public void setDataSource(DataSource dataSource) { * Set the SQL query string to use for validation. * @deprecated as of 5.3, in favor of the JDBC 4.0 connection validation */ - @Deprecated + @Deprecated(since = "5.3") public void setValidationQuery(String validationQuery) { this.validationQuery = validationQuery; } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/JdbcUtils.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/JdbcUtils.java index 84a37f8bcf75..7559918deeb2 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/JdbcUtils.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/JdbcUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2024 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -379,7 +379,7 @@ public static T extractDatabaseMetaData(DataSource dataSource, DatabaseMetaD * {@link #extractDatabaseMetaData(DataSource, DatabaseMetaDataCallback)} * with a lambda expression or method reference and a generically typed result */ - @Deprecated + @Deprecated(since = "5.2.9") @SuppressWarnings("unchecked") public static T extractDatabaseMetaData(DataSource dataSource, final String metaDataMethodName) throws MetaDataAccessException { diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/PassThroughBlob.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/PassThroughBlob.java index 4ca1e69d1ac8..0ed06daecf15 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/PassThroughBlob.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/PassThroughBlob.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2024 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,7 +31,7 @@ * @author Juergen Hoeller * @since 2.5.3 */ -@Deprecated +@Deprecated(since = "6.2") class PassThroughBlob implements Blob { private byte @Nullable [] content; diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/PassThroughClob.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/PassThroughClob.java index 5c7ca574cd7c..47324befff23 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/PassThroughClob.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/PassThroughClob.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2024 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,7 +39,7 @@ * @author Juergen Hoeller * @since 2.5.3 */ -@Deprecated +@Deprecated(since = "6.2") class PassThroughClob implements Clob { private @Nullable String content; diff --git a/spring-messaging/src/main/java/org/springframework/messaging/rsocket/RSocketRequester.java b/spring-messaging/src/main/java/org/springframework/messaging/rsocket/RSocketRequester.java index baac049c56bf..2da4bf04a949 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/rsocket/RSocketRequester.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/rsocket/RSocketRequester.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2022 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -312,7 +312,7 @@ RSocketRequester transports( * @see TcpClientTransport * @deprecated as of 5.3 in favor of {@link #tcp(String, int)} */ - @Deprecated + @Deprecated(since = "5.3") Mono connectTcp(String host, int port); /** @@ -322,7 +322,7 @@ RSocketRequester transports( * @see WebsocketClientTransport * @deprecated as of 5.3 in favor of {@link #websocket(URI)} */ - @Deprecated + @Deprecated(since = "5.3") Mono connectWebSocket(URI uri); /** @@ -331,7 +331,7 @@ RSocketRequester transports( * @return an {@code RSocketRequester} for the connection * @deprecated as of 5.3 in favor of {@link #transport(ClientTransport)} */ - @Deprecated + @Deprecated(since = "5.3") Mono connect(ClientTransport transport); } diff --git a/spring-test/src/main/java/org/springframework/test/web/servlet/setup/StubWebApplicationContext.java b/spring-test/src/main/java/org/springframework/test/web/servlet/setup/StubWebApplicationContext.java index 93664bc94b61..46f5fd87a393 100644 --- a/spring-test/src/main/java/org/springframework/test/web/servlet/setup/StubWebApplicationContext.java +++ b/spring-test/src/main/java/org/springframework/test/web/servlet/setup/StubWebApplicationContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2023 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -418,7 +418,7 @@ public T createBean(Class beanClass) { return BeanUtils.instantiateClass(beanClass); } - @Deprecated + @Deprecated(since = "6.1") @Override public Object createBean(Class beanClass, int autowireMode, boolean dependencyCheck) { return BeanUtils.instantiateClass(beanClass); diff --git a/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAspectSupport.java b/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAspectSupport.java index f1c2c32a60c7..e3df130feaf7 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAspectSupport.java +++ b/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAspectSupport.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2024 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -533,7 +533,7 @@ else if (targetClass != null) { * Determine the specific transaction manager to use for the given transaction. * @deprecated as of 6.2, in favor of {@link #determineTransactionManager(TransactionAttribute, Class)} */ - @Deprecated + @Deprecated(since = "6.2") protected @Nullable TransactionManager determineTransactionManager(@Nullable TransactionAttribute txAttr) { return null; } diff --git a/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionInterceptor.java b/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionInterceptor.java index dad6ba5ea687..15d1f529bd1f 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionInterceptor.java +++ b/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionInterceptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2020 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -86,7 +86,7 @@ public TransactionInterceptor(TransactionManager ptm, TransactionAttributeSource * @deprecated as of 5.2.5, in favor of * {@link #TransactionInterceptor(TransactionManager, TransactionAttributeSource)} */ - @Deprecated + @Deprecated(since = "5.2.5") public TransactionInterceptor(PlatformTransactionManager ptm, TransactionAttributeSource tas) { setTransactionManager(ptm); setTransactionAttributeSource(tas); @@ -100,7 +100,7 @@ public TransactionInterceptor(PlatformTransactionManager ptm, TransactionAttribu * @see #setTransactionAttributes(java.util.Properties) * @deprecated as of 5.2.5, in favor of {@link #setTransactionAttributes(Properties)} */ - @Deprecated + @Deprecated(since = "5.2.5") public TransactionInterceptor(PlatformTransactionManager ptm, Properties attributes) { setTransactionManager(ptm); setTransactionAttributes(attributes); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerMapping.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerMapping.java index 6520ddd7ee5b..2ca735f427a4 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerMapping.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerMapping.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2020 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -74,7 +74,7 @@ public interface HandlerMapping { * To access the cached path used for request mapping, use * {@link org.springframework.web.util.ServletRequestPathUtils#getCachedPathValue(ServletRequest)}. */ - @Deprecated + @Deprecated(since = "5.3") String LOOKUP_PATH = HandlerMapping.class.getName() + ".lookupPath"; /** diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/WebContentInterceptor.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/WebContentInterceptor.java index 71a47e165b9c..a1478a783232 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/WebContentInterceptor.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/WebContentInterceptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2024 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -111,7 +111,7 @@ public WebContentInterceptor(PathPatternParser parser) { * @deprecated as of 5.3, the path is resolved externally and obtained with * {@link ServletRequestPathUtils#getCachedPathValue(ServletRequest)} */ - @Deprecated + @Deprecated(since = "5.3") public void setAlwaysUseFullPath(boolean alwaysUseFullPath) { } @@ -122,7 +122,7 @@ public void setAlwaysUseFullPath(boolean alwaysUseFullPath) { * @deprecated as of 5.3, the path is resolved externally and obtained with * {@link ServletRequestPathUtils#getCachedPathValue(ServletRequest)} */ - @Deprecated + @Deprecated(since = "5.3") public void setUrlDecode(boolean urlDecode) { } @@ -131,7 +131,7 @@ public void setUrlDecode(boolean urlDecode) { * @deprecated as of 5.3, the path is resolved externally and obtained with * {@link ServletRequestPathUtils#getCachedPathValue(ServletRequest)} */ - @Deprecated + @Deprecated(since = "5.3") public void setUrlPathHelper(UrlPathHelper urlPathHelper) { } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/RequestMappingInfo.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/RequestMappingInfo.java index 1e9da4772572..39fcdfb7960a 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/RequestMappingInfo.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/RequestMappingInfo.java @@ -117,7 +117,7 @@ public final class RequestMappingInfo implements RequestCondition customRequestCondition) { this(info.name, info.patternsCondition, info.methodsCondition, info.paramsCondition, info.headersCondition, info.consumesCondition, info.producesCondition, @@ -986,7 +986,7 @@ public void setPatternParser(@Nullable PathPatternParser patternParser) { * @deprecated as of 5.3, the path is resolved externally and obtained with * {@link ServletRequestPathUtils#getCachedPathValue(ServletRequest)} */ - @Deprecated + @Deprecated(since = "5.3") public void setUrlPathHelper(@Nullable UrlPathHelper urlPathHelper) { } @@ -996,7 +996,7 @@ public void setUrlPathHelper(@Nullable UrlPathHelper urlPathHelper) { * {@link ServletRequestPathUtils#getCachedPathValue(ServletRequest)}; * this method always returns {@link UrlPathHelper#defaultInstance}. */ - @Deprecated + @Deprecated(since = "5.3") public @Nullable UrlPathHelper getUrlPathHelper() { return UrlPathHelper.defaultInstance; }