From 87b7e3d8cff3db9d225485c26437f1eacfb0651e Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Sun, 25 Nov 2012 22:28:23 +0100 Subject: [PATCH] Fixed @Lazy and @DependsOn annotation definitions to be non-inheritable Issue: SPR-9589 Issue: SPR-9476 --- .../org/springframework/context/annotation/DependsOn.java | 5 +---- .../java/org/springframework/context/annotation/Lazy.java | 4 +--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/spring-context/src/main/java/org/springframework/context/annotation/DependsOn.java b/spring-context/src/main/java/org/springframework/context/annotation/DependsOn.java index 59bd215857c..4b05e14b287 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/DependsOn.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/DependsOn.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2009 the original author or authors. + * Copyright 2002-2012 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. @@ -28,8 +28,6 @@ import java.lang.annotation.Documented; * created by the container before this bean. Used infrequently in cases where a bean * does not explicitly depend on another through properties or constructor arguments, * but rather depends on the side effects of another bean's initialization. - *

Note: This attribute will not be inherited by child bean definitions, - * hence it needs to be specified per concrete bean definition. * *

May be used on any class directly or indirectly annotated with * {@link org.springframework.stereotype.Component} or on methods annotated @@ -45,7 +43,6 @@ import java.lang.annotation.Documented; */ @Target({ElementType.TYPE, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) -@Inherited @Documented public @interface DependsOn { diff --git a/spring-context/src/main/java/org/springframework/context/annotation/Lazy.java b/spring-context/src/main/java/org/springframework/context/annotation/Lazy.java index dbce6978960..c8134b3edf4 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/Lazy.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/Lazy.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2009 the original author or authors. + * Copyright 2002-2012 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. @@ -21,7 +21,6 @@ import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import java.lang.annotation.Inherited; /** * Indicates whether a bean is to be lazily initialized. @@ -52,7 +51,6 @@ import java.lang.annotation.Inherited; */ @Target({ElementType.TYPE, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) -@Inherited @Documented public @interface Lazy {