【问题标题】:Disable JOOQ warnings禁用 JOOQ 警告
【发布时间】:2020-12-01 20:18:14
【问题描述】:

有没有办法禁用 JOOQ 的 codegen 发出的警告?它会创建很多我想省略的日志。

w: [...]/Routines.kt: (3070, 13): 'Subltree' is deprecated.
w: [...]/Routines.kt: (3082, 1): This annotation is deprecated in Kotlin. Use '@kotlin.Deprecated' instead
w: [...]/Routines.kt: (3088, 13): 'Subltree' is deprecated.
w: [...]/Routines.kt: (3099, 1): This annotation is deprecated in Kotlin. Use '@kotlin.Deprecated' instead
w: [...]/Routines.kt: (3105, 13): 'Subltree' is deprecated.
w: [...]/Routines.kt: (3210, 1): This annotation is deprecated in Kotlin. Use '@kotlin.Deprecated' instead
w: [...]/Routines.kt: (3215, 13): 'Text2ltree' is deprecated.
w: [...]/Routines.kt: (3225, 1): This annotation is deprecated in Kotlin. Use '@kotlin.Deprecated' instead
w: [...]/Routines.kt: (3229, 13): 'Text2ltree' is deprecated.
w: [...]/Routines.kt: (3238, 1): This annotation is deprecated in Kotlin. Use '@kotlin.Deprecated' instead
w: [...]/Routines.kt: (3242, 13): 'Text2ltree' is deprecated.
w: [...]/LocationsDao.kt: (137, 5): This annotation is deprecated in Kotlin. Use '@kotlin.Deprecated' instead
w: [...]/LocationsDao.kt: (143, 5): This annotation is deprecated in Kotlin. Use '@kotlin.Deprecated' instead
w: [...]/LocationsRecord.kt: (64, 25): No cast needed

【问题讨论】:

    标签: jooq


    【解决方案1】:

    这条消息:

    w: [...]/Routines.kt: (3070, 13): 'Subltree' 已弃用。

    可以通过指定<deprecated/> 标志来关闭:

    <configuration>
      <generator>
        <generate>
    
          <!-- Turn off all deprecation notices -->
          <deprecated>false</deprecated>
    
          <!-- Turn off deprecation notices on unknown types -->
          <deprecationOnUnknownTypes>false</deprecationOnUnknownTypes>
        </generate>
      </generator>
    </configuration>
    

    当然,根本问题(jOOQ 不知道如何绑定此数据类型的事实)不会消失,因此您不妨排除使用适当的&lt;excludes/&gt; 生成的例程表达。

    另一条消息:

    w: [...]/Routines.kt: (3082, 1):此注解在 Kotlin 中已弃用。请改用“@kotlin.Deprecated”

    是一个错误:https://github.com/jOOQ/jOOQ/issues/11057。但如果您指定上述标志,它也会被删除。

    【讨论】:

    • 很高兴知道。谢谢!
    猜你喜欢
    • 2018-10-06
    • 2020-11-18
    • 2012-07-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-04-24
    • 1970-01-01
    相关资源
    最近更新 更多