BAEL-7629: Update article "Circular Dependencies in Spring" (#16166)
This commit is contained in:
parent
9ba4572686
commit
9c2a26d4e8
|
@ -1,6 +1,7 @@
|
|||
package com.baeldung.circulardependency;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
|
@ -11,7 +12,7 @@ public class CircularDependencyB {
|
|||
private String message = "Hi!";
|
||||
|
||||
@Autowired
|
||||
public void setCircA(final CircularDependencyA circA) {
|
||||
public void setCircA(@Lazy final CircularDependencyA circA) {
|
||||
this.circA = circA;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue