I am sorry upfront, but I could not figure out a better name for the issue.
The minimal reproducible example can be found here. Simply running SamplePropertiesTest results in:
Caused by: java.lang.IllegalStateException: Cannot bind @ConfigurationProperties for bean 'org.sample-record.binding.SampleProperties'. Ensure that @ConstructorBinding has not been applied to regular bean
at org.springframework.util.Assert.state(Assert.java:76)
at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.bind(ConfigurationPropertiesBindingPostProcessor.java:86)
....
Thank you for looking into this and if there is anything I am missing, please let me know.
Comment From: wilkinsona
Thank you. Now that I can see the complete stack trace of the failure, I can see that you're using Spring Cloud and that this is another way to cause the problem that @mbhave describes here. This needs to be fixed in Spring Cloud.
Comment From: philwebb
I've opened https://github.com/spring-cloud/spring-cloud-commons/issues/1158
Comment From: wind57
thank you @philwebb!