Create CircularDependencyB
This commit is contained in:
parent
259f3ca7ab
commit
a42a9bbc88
|
@ -0,0 +1,22 @@
|
|||
package com.baeldung.circulardependency;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class CircularDependencyB {
|
||||
|
||||
private CircularDependencyA circA;
|
||||
|
||||
private String message = "Hi!";
|
||||
|
||||
@Autowired
|
||||
public void setCircA(final CircularDependencyA circA) {
|
||||
this.circA = circA;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue