官术网_书友最值得收藏!

Using converters for high-level configuration

MicroProfile Config will read Java String objects from its ConfigSource. However, it provides facilities to convert these String objects into more specific types in your application.

For example, the myUrl field we described previously is a URL object. The corresponding property, my.url, is read as a String object and then converted into a URL object before it is injected.

If the application uses the Config object, the MicroProfile Config implementation will also convert the String object into the type passed as the second argument of the getValue and getOptionalValue methods. This conversion can be done using different converter types: built-in, automatic, and custom. We will talk about them in detail now.

主站蜘蛛池模板: 梨树县| 四子王旗| 昌平区| 客服| 松阳县| 谷城县| 汶川县| 静海县| 西城区| 新龙县| 徐闻县| 泰来县| 西乌| 永顺县| 西乌珠穆沁旗| 金湖县| 宁明县| 金华市| 保亭| 新乡县| 汶川县| 南京市| 邯郸市| 柳河县| 巨野县| 依兰县| 绥化市| 岢岚县| 绥中县| 石棉县| 加查县| 大同县| 阳泉市| 中宁县| 东阿县| 汽车| 交城县| 永昌县| 杭锦后旗| 保德县| 巴青县|