spring-boot-starter-parent 2.6.6

Hello.

I am using the @Conditional annotation to validate if one of my beans has one property or another.

The problem I have is that when my @configuration class is executed

@Bean
public three loadAnyBean(beanConfigOne one, beanConfigOne two) {

return CarConfig.newBuilder().env("dev").one(one).two(two).build();

}
}

My beans one and two have no value.

This bean are of type @configuration and its properties are loaded with #{xxxxxxx}.

If I remove the @Conditional from my beans, everything works fine.

Can you help me? what am I doing wrong?

Comment From: sbrannen

Thanks for getting in touch, but it feels like this is a question that would be better suited to Stack Overflow. As mentioned in the guidelines for contributing, we prefer to use the issue tracker only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add some more details if you feel this is a genuine bug.