Working with Databases
Explore how to set up a database connection in Kotlin using Vert.x. Learn to configure connection pools, manage environment variables, and perform CRUD operations within tests to ensure your reactive microservice interacts correctly with a PostgreSQL database.
We'll cover the following...
We'll cover the following...
To be able to progress further with our tests, we need the ability to create entities in the database. For that, we’ll need to connect to the database.
First, let’s add the following two lines to our build.gradle.kts dependencies section:
implementation("org.postgresql:postgresql:42.3.0")
implementation("io.vertx:vertx-pg-client:$vertxVersion")
The first line of code ...