Skip to content

Commit 87b7e3d

Browse files
committed
Fixed @lazy and @dependsOn annotation definitions to be non-inheritable
Issue: SPR-9589 Issue: SPR-9476
1 parent 9e337d2 commit 87b7e3d

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

spring-context/src/main/java/org/springframework/context/annotation/DependsOn.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2009 the original author or authors.
2+
* Copyright 2002-2012 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -28,8 +28,6 @@
2828
* created by the container before this bean. Used infrequently in cases where a bean
2929
* does not explicitly depend on another through properties or constructor arguments,
3030
* but rather depends on the side effects of another bean's initialization.
31-
* <p>Note: This attribute will not be inherited by child bean definitions,
32-
* hence it needs to be specified per concrete bean definition.
3331
*
3432
* <p>May be used on any class directly or indirectly annotated with
3533
* {@link org.springframework.stereotype.Component} or on methods annotated
@@ -45,7 +43,6 @@
4543
*/
4644
@Target({ElementType.TYPE, ElementType.METHOD})
4745
@Retention(RetentionPolicy.RUNTIME)
48-
@Inherited
4946
@Documented
5047
public @interface DependsOn {
5148

spring-context/src/main/java/org/springframework/context/annotation/Lazy.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2009 the original author or authors.
2+
* Copyright 2002-2012 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -21,7 +21,6 @@
2121
import java.lang.annotation.Retention;
2222
import java.lang.annotation.RetentionPolicy;
2323
import java.lang.annotation.Target;
24-
import java.lang.annotation.Inherited;
2524

2625
/**
2726
* Indicates whether a bean is to be lazily initialized.
@@ -52,7 +51,6 @@
5251
*/
5352
@Target({ElementType.TYPE, ElementType.METHOD})
5453
@Retention(RetentionPolicy.RUNTIME)
55-
@Inherited
5654
@Documented
5755
public @interface Lazy {
5856

0 commit comments

Comments
 (0)