Skip to content

Commit a42a9bb

Browse files
Create CircularDependencyB
1 parent 259f3ca commit a42a9bb

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package com.baeldung.circulardependency;
2+
3+
import org.springframework.beans.factory.annotation.Autowired;
4+
import org.springframework.stereotype.Component;
5+
6+
@Component
7+
public class CircularDependencyB {
8+
9+
private CircularDependencyA circA;
10+
11+
private String message = "Hi!";
12+
13+
@Autowired
14+
public void setCircA(final CircularDependencyA circA) {
15+
this.circA = circA;
16+
}
17+
18+
public String getMessage() {
19+
return message;
20+
}
21+
22+
}

0 commit comments

Comments
 (0)