上QQ阅读APP看书,第一时间看更新
Built-in converters
The MicroProfile Config implementation provides built-in converters for the primitive types (boolean, int, long, byte, float, and double) and their corresponding Java types (for example, Integer).
It also provides support for arrays in the property value using the "," as the item separator. If the "," must be part of an item, it must be escaped with a backslash "\":
private String[] pets = config.getValue("myPets", String[].class)
If the value of the myPets property is dog,cat,dog\\,cat, the elements of the array stored in pets would be {"dog", "cat", "dog,cat"}.