Pojo(强类型)是unicorn的首选使用方式,其它的数据源都是弱类型的。 使用`getParameter`返回`Map`可以用来表示弱类型数据。 即先读属性(`getXxx`),如果没有,再读`getParameter`中的值。 如果对应的`Parameters`中有属性名的Key,可以根据需要: - 日志 **警告**,因为推荐使用强类型配置。 - 抛出异常,禁止这种不推荐的行为
Pojo(强类型)是unicorn的首选使用方式,其它的数据源都是弱类型的。
使用
getParameter返回Map可以用来表示弱类型数据。即先读属性(
getXxx),如果没有,再读getParameter中的值。如果对应的
Parameters中有属性名的Key,可以根据需要: