ConditionalOnBean without creating own config for every bean
I got a
Am I doing something wrong or do I really need to manually create all beans, when I wanna work with conditions?
@Configuration that creates a bean, lets say Mandatory, when a specific property is set. This bean is used by many other beans that are on other files and won't work without given bean. So I tried to add @ConditionalOnBean(value = [Mandatory::class]) on the classes that will need that bean. But that does not seem to work. The condition only worked when I created the beans manually inside of the same configuration.Am I doing something wrong or do I really need to manually create all beans, when I wanna work with conditions?