Automatic converters
MicroProfile Config also defines automatic converters. If a converter is not known for a given Java type, it will attempt to convert a String object into it using any one of the three different approaches:
- The Java type has a public constructor with a String parameter.
- It has a public static valueOf(String) method.
- It has a public static parse(String) method.
That's how the my.url property was converted from String into URL since the java.net.URL type has the public URL(String) constructor.