从 MS SQL db 使用 JOOQ 生成代码时遇到问题

trouble generating code with JOOQ from an MS SQL db

我正在尝试使用 JOOQ 从 Spring 引导应用程序中的现有数据库生成代码文件。但是,当我 运行 Maven 插件时,出现以下错误:

[ERROR] Failed to execute goal org.jooq:jooq-codegen-maven:3.13.3:generate (default-cli) on project english-learners: Error running jOOQ code generation tool: Your configured database type was not found. This can have several reasons:
[ERROR] - You want to use a commercial jOOQ Edition, but you pulled the Open Source Edition from Maven Central.
[ERROR] - You have mis-typed your class name. org.jooq.meta.sqlserver.SQLServerDatabase

我不清楚这个错误是什么意思 - 我从 the documentation 复制了名称。我已经测试过,可以连接到数据库。我假设我的配置有问题。

这是我的插件配置:

<plugin>
    <groupId>org.jooq</groupId>
    <artifactId>jooq-codegen-maven</artifactId>
    <dependencies>
        <dependency>
            <groupId>com.microsoft.sqlserver</groupId>
            <artifactId>mssql-jdbc</artifactId>
            <version>${mssql-jdbc.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jooq</groupId>
            <artifactId>jooq-meta</artifactId>
            <version>${jooq.version}</version>
        </dependency>
    </dependencies>
    <executions>
        <execution>
            <goals>
                <goal>generate</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <jdbc>
            <driver>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver>
            <url>${datasource.url}</url>
            <user>${datasource.username}</user>
            <password>${datasource.password}</password>
        </jdbc>
        <generator>
            <database>
                <name>org.jooq.meta.sqlserver.SQLServerDatabase</name>
                <includes>.*</includes>
                <inputSchema>public</inputSchema>
            </database>
            <target>
                <packageName>my.project</packageName>
            </target>
        </generator>
    </configuration>
</plugin>

版本:

Java            14
Spring Boot     2.3.2.RELEASE
JOOQ            3.13.3
mssql-jdbc      8.4.0.jre14
MS SQL          2012

任何人都可以帮助我进行配置或指出我做错了什么吗?

jOOQ 对于商业数据库不是免费的。

请查看:https://www.jooq.org/download/