Test project for Spring Boot 2.3.2/Kotlin with coroutines integration and R2DBC repositories. Testcontainers (MySql or PostgerSql) can be used for testing.
- gradle (kotlin)
- kotlin
- webflux
- spring-data-r2dbc
- h2
- actuator
Versions:
- Spring Boot 2.3.2
- Gradle 6.5.1
- Kotlin 1.3.72
- MockK 1.10.0
- Testcontainers (Mysql et Postgres) 1.14.3
testImplementation("io.mockk:mockk:1.10.0")
testImplementation("org.testcontainers:postgresql:1.14.3")
testImplementation("org.testcontainers:mysql:1.14.3")
- Unit tests and Integration tests are including (100% coverage :))
- Testcontainers can be used for tests with either MySQL or PostgreSQL just set the test
application.properties
property:app.test.testcontainer.db
to eithermysql
orpostgres
(anything else will use h2)
For further reference, please consider the following sections:
- Official Gradle documentation
- Spring Boot Gradle Plugin Reference Guide
- Coroutines section of the Spring Framework Documentation
- Spring Data R2DBC [Experimental]
- Spring Boot Actuator
The following guides illustrate how to use some features concretely:
These additional references should also help you: