Is there a way to create @ConfigurationProperties beans in runtime using spring's functionality? Let's say I want to state the prefixes in my custom annotation and create beans for them in runtime because creating them manually seems like a boiler-plate to me.
Something like this:
@MyAnnotation({
@CustomProps(prefix="foo"),
@CustomProps(prefix="bar")
})
And then in runtime, I want to have two config beans of the specified type created from properties with these prefixes. I know I can generate code for them using an annotation processor, but maybe it's easier to achieve by spring's bean processors or something like this?