Jooq 和 Spring 引导:通过启动器升级 JOOQ:无法将 spring.jooq.sql-dialect' 绑定到 org.jooq.SQLDialect

Jooq and Spring boot: Upgraded JOOQ via starter: failed to bind spring.jooq.sql-dialect' to org.jooq.SQLDialect

所以我将 spring-boot-parent-starter 升级到 2.2.8.RELEASE,结果是 jooq 3.12.4。以前我有 3.11.5.

我收到以下错误

Failed to bind properties under 'spring.jooq.sql-dialect' to org.jooq.SQLDialect:

Property: spring.jooq.sqldialect
Value: MYSQL_5_7
Origin: "spring.jooq.SQLDialect" from property source "applicationConfig: [classpath:/config/application.yaml]"
Reason: failed to convert java.lang.String to org.jooq.SQLDialect

这是我的 application.yaml 之前的样子

spring:
  jooq:
    sql-dialect: mysql_5_7

如果您阅读了整个错误消息,您将看到:

Failed to bind properties under 'spring.jooq.sql-dialect' to org.jooq.SQLDialect:

    Property: spring.jooq.sql-dialect
    Value: MYSQL_5_7
    Origin: class path resource [application.properties]:2:25
    Reason: failed to convert java.lang.String to org.jooq.SQLDialect

Action:

Update your application's configuration. The following values are valid:

    CUBRID
    DEFAULT
    DERBY
    FIREBIRD
    H2
    HSQLDB
    MARIADB
    MYSQL
    POSTGRES
    SQL99
    SQLITE

MYSQL_5_7 不是 jOOQ 开源支持的值。仅在专业版中可用

MYSQL_5_7
@Pro
public static final SQLDialect MYSQL_5_7
The MySQL 5.7 dialect.
This dialect is available in commercial jOOQ distributions, only.