Spring Boot Web Flux with JOOQ for interfacing with DB and Kotlin coroutines to make blocking JDBC calls run asynchronously. Now with rsockets.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

260 lines
10 KiB

4 years ago
  1. <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  4. <modelVersion>4.0.0</modelVersion>
  5. <parent>
  6. <groupId>org.springframework.boot</groupId>
  7. <artifactId>spring-boot-starter-parent</artifactId>
  8. <version>2.3.2.RELEASE</version>
  9. <relativePath/>
  10. </parent>
  11. <groupId>com.example</groupId>
  12. <artifactId>demo</artifactId>
  13. <version>0.0.1-SNAPSHOT</version>
  14. <name>demo</name>
  15. <description>Kotlin Demo project for Spring Boot</description>
  16. <properties>
  17. <java.version>11</java.version>
  18. <kotlin.version>1.3.72</kotlin.version>
  19. <kotlin.compiler.jvmTarget>11</kotlin.compiler.jvmTarget>
  20. </properties>
  21. <dependencies>
  22. <dependency>
  23. <groupId>org.springframework.boot</groupId>
  24. <artifactId>spring-boot-starter-jooq</artifactId>
  25. </dependency>
  26. <dependency>
  27. <groupId>org.springframework.boot</groupId>
  28. <artifactId>spring-boot-starter-thymeleaf</artifactId>
  29. </dependency>
  30. <dependency>
  31. <groupId>org.springframework.boot</groupId>
  32. <artifactId>spring-boot-starter-webflux</artifactId>
  33. </dependency>
  34. <dependency>
  35. <groupId>com.fasterxml.jackson.module</groupId>
  36. <artifactId>jackson-module-kotlin</artifactId>
  37. </dependency>
  38. <dependency>
  39. <groupId>io.projectreactor.kotlin</groupId>
  40. <artifactId>reactor-kotlin-extensions</artifactId>
  41. </dependency>
  42. <dependency>
  43. <groupId>org.flywaydb</groupId>
  44. <artifactId>flyway-core</artifactId>
  45. <version>5.2.0</version>
  46. </dependency>
  47. <dependency>
  48. <groupId>org.jetbrains.kotlin</groupId>
  49. <artifactId>kotlin-reflect</artifactId>
  50. </dependency>
  51. <dependency>
  52. <groupId>org.jetbrains.kotlin</groupId>
  53. <artifactId>kotlin-stdlib-jdk8</artifactId>
  54. </dependency>
  55. <dependency>
  56. <groupId>org.jetbrains.kotlinx</groupId>
  57. <artifactId>kotlinx-coroutines-reactor</artifactId>
  58. </dependency>
  59. <dependency>
  60. <groupId>org.springframework.boot</groupId>
  61. <artifactId>spring-boot-devtools</artifactId>
  62. <scope>runtime</scope>
  63. <optional>true</optional>
  64. </dependency>
  65. <dependency>
  66. <groupId>com.h2database</groupId>
  67. <artifactId>h2</artifactId>
  68. <scope>test</scope>
  69. </dependency>
  70. <dependency>
  71. <groupId>org.springframework.boot</groupId>
  72. <artifactId>spring-boot-configuration-processor</artifactId>
  73. <optional>true</optional>
  74. </dependency>
  75. <dependency>
  76. <groupId>org.projectlombok</groupId>
  77. <artifactId>lombok</artifactId>
  78. <optional>true</optional>
  79. </dependency>
  80. <dependency>
  81. <groupId>org.springframework.boot</groupId>
  82. <artifactId>spring-boot-starter-test</artifactId>
  83. <scope>test</scope>
  84. <exclusions>
  85. <exclusion>
  86. <groupId>org.junit.vintage</groupId>
  87. <artifactId>junit-vintage-engine</artifactId>
  88. </exclusion>
  89. </exclusions>
  90. </dependency>
  91. <dependency>
  92. <groupId>io.projectreactor</groupId>
  93. <artifactId>reactor-test</artifactId>
  94. <scope>test</scope>
  95. </dependency>
  96. <dependency>
  97. <groupId>mysql</groupId>
  98. <artifactId>mysql-connector-java</artifactId>
  99. <scope>runtime</scope>
  100. </dependency>
  101. <dependency>
  102. <groupId>org.springframework.boot</groupId>
  103. <artifactId>spring-boot-starter-rsocket</artifactId>
  104. <scope>compile</scope>
  105. </dependency>
  106. <!-- https://mvnrepository.com/artifact/io.vavr/vavr -->
  107. <dependency>
  108. <groupId>io.vavr</groupId>
  109. <artifactId>vavr</artifactId>
  110. <version>0.10.3</version>
  111. </dependency>
  112. <!-- https://mvnrepository.com/artifact/io.vavr/vavr-kotlin -->
  113. <dependency>
  114. <groupId>io.vavr</groupId>
  115. <artifactId>vavr-kotlin</artifactId>
  116. <version>0.10.2</version>
  117. </dependency>
  118. </dependencies>
  119. <build>
  120. <sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
  121. <testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory>
  122. <plugins>
  123. <plugin>
  124. <groupId>org.codehaus.mojo</groupId>
  125. <artifactId>properties-maven-plugin</artifactId>
  126. <version>1.0.0</version>
  127. <executions>
  128. <execution>
  129. <phase>initialize</phase>
  130. <goals>
  131. <goal>read-project-properties</goal>
  132. </goals>
  133. <configuration>
  134. <files>
  135. <file>src/main/resources/application.properties</file>
  136. </files>
  137. </configuration>
  138. </execution>
  139. </executions>
  140. </plugin>
  141. <plugin>
  142. <groupId>org.flywaydb</groupId>
  143. <artifactId>flyway-maven-plugin</artifactId>
  144. <version>5.2.4</version>
  145. <executions>
  146. <execution>
  147. <phase>generate-sources</phase>
  148. <goals>
  149. <goal>migrate</goal>
  150. </goals>
  151. </execution>
  152. </executions>
  153. <configuration>
  154. <driver>${spring.datasource.driverClassName}</driver>
  155. <url>${spring.datasource.url}</url>
  156. <user>${spring.datasource.username}</user>
  157. <password>${spring.datasource.password}</password>
  158. </configuration>
  159. </plugin>
  160. <plugin>
  161. <groupId>org.springframework.boot</groupId>
  162. <artifactId>spring-boot-maven-plugin</artifactId>
  163. </plugin>
  164. <plugin>
  165. <groupId>org.jetbrains.kotlin</groupId>
  166. <artifactId>kotlin-maven-plugin</artifactId>
  167. <configuration>
  168. <args>
  169. <arg>-Xjsr305=strict</arg>
  170. </args>
  171. <compilerPlugins>
  172. <plugin>spring</plugin>
  173. </compilerPlugins>
  174. </configuration>
  175. <dependencies>
  176. <dependency>
  177. <groupId>org.jetbrains.kotlin</groupId>
  178. <artifactId>kotlin-maven-allopen</artifactId>
  179. <version>${kotlin.version}</version>
  180. </dependency>
  181. </dependencies>
  182. </plugin>
  183. <plugin>
  184. <groupId>org.jooq</groupId>
  185. <artifactId>jooq-codegen-maven</artifactId>
  186. <executions>
  187. <execution>
  188. <id>generate-mysql</id>
  189. <phase>generate-sources</phase>
  190. <goals>
  191. <goal>generate</goal>
  192. </goals>
  193. <configuration>
  194. <jdbc>
  195. <driver>${spring.datasource.driverClassName}</driver>
  196. <url>${spring.datasource.url}</url>
  197. <user>${spring.datasource.username}</user>
  198. <password>${spring.datasource.password}</password>
  199. </jdbc>
  200. <generator>
  201. <database>
  202. <name>org.jooq.meta.mysql.MySQLDatabase</name>
  203. <excludes>(?i:information_schema\..*)</excludes>
  204. </database>
  205. <generate>
  206. <deprecated>false</deprecated>
  207. <instanceFields>true</instanceFields>
  208. <pojos>true</pojos>
  209. <daos>true</daos>
  210. </generate>
  211. <target>
  212. <packageName>com.example.demo.model</packageName>
  213. <directory>target/generated-sources/jooq</directory>
  214. </target>
  215. </generator>
  216. </configuration>
  217. </execution>
  218. </executions>
  219. <dependencies>
  220. <dependency>
  221. <groupId>mysql</groupId>
  222. <artifactId>mysql-connector-java</artifactId>
  223. <version>8.0.20</version>
  224. </dependency>
  225. </dependencies>
  226. </plugin>
  227. </plugins>
  228. </build>
  229. <repositories>
  230. <repository>
  231. <id>spring-milestones</id>
  232. <name>Spring Milestones</name>
  233. <url>https://repo.spring.io/milestone</url>
  234. </repository>
  235. <repository>
  236. <id>spring-snapshots</id>
  237. <name>Spring Snapshots</name>
  238. <url>https://repo.spring.io/snapshot</url>
  239. <snapshots>
  240. <enabled>true</enabled>
  241. </snapshots>
  242. </repository>
  243. </repositories>
  244. <pluginRepositories>
  245. <pluginRepository>
  246. <id>spring-milestones</id>
  247. <name>Spring Milestones</name>
  248. <url>https://repo.spring.io/milestone</url>
  249. </pluginRepository>
  250. <pluginRepository>
  251. <id>spring-snapshots</id>
  252. <name>Spring Snapshots</name>
  253. <url>https://repo.spring.io/snapshot</url>
  254. <snapshots>
  255. <enabled>true</enabled>
  256. </snapshots>
  257. </pluginRepository>
  258. </pluginRepositories>
  259. </project>