-
Notifications
You must be signed in to change notification settings - Fork 0
/
pom.xml
160 lines (137 loc) · 6.16 KB
/
pom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.skillup</groupId>
<artifactId>skillup-ecom-plat</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.3</version>
<relativePath/>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- mysql data base setup -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<!-- flyway -->
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-mysql</artifactId>
</dependency>
<!-- Jooq, ORM object-relational mapping database -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jooq</artifactId>
</dependency>
<dependency>
<groupId>org.jooq</groupId>
<artifactId>jooq-codegen</artifactId>
<scope>provided</scope>
</dependency>
<!-- lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.24</version>
<scope>provided</scope>
</dependency>
<!-- mapStruct -->
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId>
<version>1.5.3.Final</version>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>1.5.3.Final</version>
</dependency>
<!-- validate -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
<version>2.7.3</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.jooq</groupId>
<artifactId>jooq-codegen-maven</artifactId>
<version>3.14.16</version>
<executions>
<execution>
<goals>
<!-- 目标generate用于生成Java代码 -->
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<!-- JOOQ单独配置JDBC链接 -->
<jdbc>
<driver>com.mysql.jdbc.Driver</driver>
<url>jdbc:mysql://localhost:3306/skillup?serverTimezone=GMT</url>
<user>root</user>
<password>rootroot</password>
</jdbc>
<generator>
<!-- 代码生成器 -->
<!--<name>org.jooq.util.JavaGenerator</name>-->
<name>org.jooq.codegen.JavaGenerator</name>
<database>
<!--下面这两行是为view也生成代码的关键,不需要view不用配置-->
<!--force generating id'sfor everything in public schema, that has an 'id' field-->
<!-- <syntheticPrimaryKeys>public\..*\.id</syntheticPrimaryKeys>-->
<!--name for fake primary key-->
<!-- <overridePrimaryKeys>override_primmary_key</overridePrimaryKeys>-->
<!--<name>org.jooq.util.mysql.MySQLDatabase</name>-->
<name>org.jooq.meta.mysql.MySQLDatabase</name>
<!--include和exclude用于控制为数据库中哪些表生成代码-->
<includes>.*</includes>
<!-- excludes不同表之间用竖杠分隔-->
<excludes>
flyway_schema_history
</excludes>
<!--数据库名称-->
<inputSchema>skillup</inputSchema>
</database>
<generate>
<!--生成dao和pojo-->
<!-- <daos>true</daos>-->
<!-- <pojos>true</pojos>-->
<!--把数据库时间类型映射到java 8时间类型-->
<javaTimeTypes>true</javaTimeTypes>
<!--<interfaces>true</interfaces>-->
<!--不在生成的代码中添加spring注释,比如@Repository-->
<springAnnotations>ture</springAnnotations>
</generate>
<target>
<!--生成代码文件的包名及放置目录-->
<packageName>com.skillup.infrastructure.jooq</packageName>
<directory>src/main/java</directory>
</target>
</generator>
</configuration>
</plugin>
</plugins>
</build>
</project>