AppConfiguration icon indicating copy to clipboard operation
AppConfiguration copied to clipboard

Failed to bind properties under 'config.map'

Open surjjin opened this issue 1 year ago • 1 comments

I am using Spring-boot Application where I am able to connect with Azure App Configuration. But getting the error when I try to read value with content-type application/JSON.

My Java Class

@ConfigurationProperties(prefix = "config") @Getter @Setter public class AppConfigProperties { private String test; private Map<String, Map<Integer, List<Integer>>> map; } App configuration

key: map value: {"Cream":{"1":[2,3,4],"2":[25]},"Ice":{"1":[2,3,4],"2":[25]}} content type = application/json Error :

Description:

Failed to bind properties under 'config.map' to java.util.Map<java.lang.String, java.util.Map<java.lang.Integer, java.util.List<java.lang.Integer>>>:

Reason: No converter found capable of converting from type [java.lang.String] to type [java.util.Map<java.lang.String, java.util.Map<java.lang.Integer, java.util.List<java.lang.Integer>>>]

Action:

Update your application's configuration

surjjin avatar Sep 26 '22 07:09 surjjin

Hi @surjjin just to verify, your key in App Configuration is something like /application/config.map?

I am unable to replicate this on the latest version, which version of the library are you using?

mrm9084 avatar Sep 26 '22 17:09 mrm9084

@surjjin please let us know if you have an update for @mrm9084's questions.

zhenlan avatar Oct 28 '22 17:10 zhenlan