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

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.

主站蜘蛛池模板: 故城县| 安塞县| 安陆市| 青河县| 遂宁市| 浙江省| 三亚市| 北宁市| 修文县| 遵化市| 杭锦后旗| 临高县| 彭阳县| 伊金霍洛旗| 肃南| 玛纳斯县| 清水河县| 阜新市| 高尔夫| 吉木萨尔县| 遂昌县| 台安县| 饶阳县| 达孜县| 洛南县| 密山市| 卢氏县| 专栏| 千阳县| 合山市| 铜陵市| 屯留县| 鲁甸县| 南宁市| 商水县| 保定市| 宜都市| 昌平区| 天峨县| 嫩江县| 新密市|