Sample project showing problem with configuration properties exception
UPD: it is fixed with boot 2.2.0.RELEASE. See spring-projects/spring-boot#18509 for details
By default application would show the problem
Open com.example.conversionproblem.AppProperties
and uncomment second
field:
@Valid
private Map<MyEnum, NestedProperty> myEnumMap;
to see that message would change
There are 2 more spring profiles that show options with different behaviour:
- good - it proofs that when there is no validation issues, context is created fine
- enum - it proofs that for more simple scenario - explicit enum typing of keys spring generates expected validation message