I have a bean A, with a property pA. Now, i want to inject this property into another bean B's property pB. Tried using @Value, with both $ and #, but its not working. This is my class B.
@Component
public class B
{
@Value("${a.aP}")
private boolean bP;
}
Class A looks like below:
@Component
public class A
{
private boolean aP;
if(some condition){
aP = true;
}
}