Tried to create a configuration class which depends on another bean class using @DependsOn annotation and later found that @DependsOn only work along with @Bean and @Compone