This annotation can be used to apply a FieldNameFormatter
to a Configuration without having to instantiate a Properties
object. The FieldNameFormatter returned by the annotation
takes precedence over the value returned by the Properties object.
Added FieldNameFormatters.UPPER_UNDERSCORE
If your configuration has a lot of fields and you want to exclude some
of these fields without making them final, static or transient, you can
configure your properties object to use additional FieldFilters.
A FieldFilter filters the fields of a configuration class by a specified
criterion. For example, if you only want to include fields whose names
don't start with 'ignore', you would add the following filter:
YamlProperties properties = YamlProperties.builder()
.addFilter(field -> !field.getName().startsWith("ignore"))
// ...
.build();