-
Notifications
You must be signed in to change notification settings - Fork 41.6k
Description
I created a very, very simple project to test out configuration properties constructor binding. It sure doesn't seem to work at all. I've attached a zip file with the little project.
I also created this on stackoverflow but didn't get much help there: https://stackoverflow.com/questions/58259065/configurationproperties-constructor-binding-not-working-in-2-2-0-rc1
In the attached project, if I remove the "final" keyword on the "stuff" field, uncomment the setter method, and comment out the single argument constructor, the project runs fine (the application starts and the framework calls the setter). I've also tried commenting out the @configuration annotation but that made no difference.
Anyway, when the application starts it fails with this error:
***************************
APPLICATION FAILED TO START
***************************
Description:
Parameter 0 of constructor in com.acme.AppConfig required a bean of type 'java.lang.String' that could not be found.
Action:
Consider defining a bean of type 'java.lang.String' in your configuration.