When trying to fill an object that implements Map but is valued by a single property via a converter, the MapBinder class does not use a PlaceholderResolver after retrieving the property value. It can be seen in the method bindAggregate.

This result in placeholder not being resolved in the property.

The usecase seems strange, but this is the solution I find to allow multiple way of filing a pseudo Map object from either sub properties or a legacy string format.

Comment From: JohannLangloys

Just to add some more information.

In the Binder class, when binding a "simple" property :

private <T> Object bindProperty(Bindable<T> target, Context context, ConfigurationProperty property) {
    context.setConfigurationProperty(property);
    Object result = property.getValue();
    result = this.placeholdersResolver.resolvePlaceholders(result);
    result = context.getConverter().convert(result, target);
    return result;
}

We can see the use of the placeholdersResolver.

Meanwhile in the MapBinder class, when binding a property corresponding to a map :

if (property != null && !hasDescendants) {
    getContext().setConfigurationProperty(property);
    return getContext().getConverter().convert(property.getValue(), target);
}

The property is converted but no call to the placeholdersResolver is done.

Comment From: wanger26

You can assign this one to me, hopefully will have a fix for it shortly.

Comment From: scottfrederick

Closing in favor of #39507