现在我正在使用 jooq 库,我多次尝试通过在这里和那里搜索来解决问题。
这是 pom.xml
<groupId>org.jooq</groupId>
<artifactId>jooq-codegen-maven</artifactId>
<version>3.11.5</version>
<executions>
<execution>
<id>jooq-codegen</id>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.4.1208</version>
</dependency>
</dependencies>
<configuration>
<jdbc>
<driver>org.postgresql.Driver</driver>
<url>jdbc:postgresql:jOOQ</url>
<user>postgres</user>
<password>root</password>
</jdbc>
<generator>
<database>
<name>org.jooq.util.postgres.PostgresDatabase</name>
<includes>.*</includes>
<excludes></excludes>
<inputSchema>public</inputSchema>
</database>
<target>
<packageName>org.thoughts.on.java.db</packageName>
<directory>target/generated-sources/jooq</directory>
</target>
</generator>
</configuration>
</plugin>
运行此->Maven 构建后,结果如下:(你好是我的项目的名称)
[INFO] --- jooq-codegen-maven:3.11.5:generate (jooq-codegen) @ hello ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.024 s
[INFO] Finished at: 2018-09-25T13:01:11+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.jooq:jooq-codegen-maven:3.11.5:generate (jooq-codegen) on project hello: Error running jOOQ code generation tool: La tentative de connexion a échoué. Séquence UTF-8 illégale: l'octet 2 de la séquence d'octet 3 n'est pas 10xxxxxx: 101 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
单击 Maven 构建后,我在目标框中尝试了所有这些:安装/包/生成/生成源,但它们都不起作用!任何人都可以帮助我吗?