Spring @Validated annotation prevents @ConfigurationProproperties value injection, why?
问题 I am trying with @ConfigurationProperties and I find two things: for tests to work, I have to put configuration properties files (yml) in test package; setters and an empty constructor are required. If I annotated the class with @Validated , injection just fails with all null values. If you say the first one is understandable, and the second one? Why? The purpose is to validate configuration properties injection, so that crucial properties values should not be absent when the application