Using @DependsOn with @Component annotation

In this post under Spring Core, I will show with example how to use “@DependsOn” annotation to indicate dependencies between two beans marked with “@Component” annotation. For our example we have two beans “Bean1” and “Bean2” and both are annotated with “@Component” annotation. Now to declare that “Bean2” is dependent on “Bean1”, we annotate the…… Continue reading Using @DependsOn with @Component annotation