Reputation: 2280
I have two classes
@Component
@DependsOn("A")//I added this annotation to execute first B.afterSingletonsInstantiated() but it does not work
public class B implements SmartInitializingSingleton {
@Override
public void afterSingletonsInstantiated() {
log.info("B");
}
}
@Component
public class A implements SmartInitializingSingleton {
@Override
public void afterSingletonsInstantiated() {
log.info("A");
}
}
The question is, how can I specify one has to execute its overridden method before the other?
Upvotes: 0
Views: 34