我正在尝试将jOOQ包含在我的代码中,但是未生成任何代码。执行时mvn clean generate-sources,不会生成任何源。我希望它创建一个Category在以下schema.sql-file文件中定义的类。CREATE TABLE IF NOT EXISTS category ( id INTEGER IDENTITY PRIMARY KEY, name VARCHAR(100), description VARCHAR(2000), age_group VARCHAR(20), created DATETIME, inserted BIGINT);我的pom.xml文件如下所示:<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <artifactId>spring-data-jdbc-jooq</artifactId> <parent> <groupId>org.springframework.data.examples</groupId> <artifactId>spring-data-jdbc-examples</artifactId> <version>2.0.0.BUILD-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> <name>Spring Data JDBC - Usage with jOOQ</name> <description>Sample project demonstrating Spring Data JDBC features</description> <dependencies> <dependency> <groupId>org.jooq</groupId> <artifactId>jooq</artifactId> <version>3.10.8</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-jooq</artifactId> <version>2.0.3.RELEASE</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.jooq</groupId> <artifactId>jooq-codegen-maven</artifactId> <version>3.10.8</version> <executions> <execution> <goals> <goal>generate</goal> </goals> </execution> </executions>我假设gensrc应该使用适当的类来创建目录。Maven构建成功运行,没有任何错误。您可以在此GitHub存储库中找到整个项目。
添加回答
举报
0/150
提交
取消