嘿 avro 用户和专家,
我想使用 avrologicalTypes,意味着我自己创建一些 - 不仅仅是使用内置的。
问题是如何让编译器从架构生成代码以使用我自己创建的代码。
我创建了我的架构(相关部分):
{
"name": "street",
"type": {
"type": "string",
"logicalType": "custom-street"
},
"doc": "Street format ending with house number"
}
(当然还有创建类型和转换,参见https://github.com/markush81/avro-examples)
我现在不知道如何配置编译器来使用它。
我通过 gradle 插件使用编译器(但我想这首先没有任何区别)
plugins {
id 'com.commercehub.gradle.plugin.avro' version '0.14.2'
}
avro {
enableDecimalLogicalType = true //enable built-in decimal type
}
感谢您提供任何提示(或解决方法)。
PS:当然我知道如何操作生成的类来支持我的逻辑类型(见:https ://github.com/markush81/avro-examples/tree/master/src/main/manual ),但这意味着我永远无法从我的模式定义中重新编译。