Skip to content
Exposed docs1.11

Getting Started with Bluetape4k Exposed

Latest stable Based on Exposed release 1.11.0

Applications should not pin each Exposed module independently. Import the bluetape4k-dependencies BOM once, then add only the data-access path the application needs.

dependencies {
implementation(platform("io.github.bluetape4k:bluetape4k-dependencies:<version>"))
implementation("io.github.bluetape4k.exposed:bluetape4k-exposed-jdbc")
// Choose this instead for coroutine-native reactive database access:
// implementation("io.github.bluetape4k.exposed:bluetape4k-exposed-r2dbc")
}

Replace <version> with the released bluetape4k-dependencies version used by your application. The 1.11.0 label in this manual is the verified Exposed source baseline, not the consumer version to paste into this snippet.

Do not import both paths by habit. Choose the primary path from the driver model, transaction owner, blocking boundary, and framework integration.

DecisionJDBCR2DBC
DriverBlocking JDBC driverNon-blocking R2DBC driver
Call chainAllows or isolates blocking workRemains coroutine/non-blocking end to end
Transaction ownerJDBC transaction managerR2DBC transaction manager and coroutine context
Typical integrationSpring MVC and conventional batch workSpring WebFlux and coroutine services

JDBC is the production default when an existing JDBC driver and transaction manager own the boundary. Do not choose R2DBC merely because a function is marked suspend; use it when the driver, pool, framework, and full call chain preserve the non-blocking model.

  1. Read core and dao for IDs, entities, and mapping.
  2. Build repository and transaction boundaries with either jdbc or r2dbc.
  3. Add caches, database adapters, and Spring Boot or Ktor integration only after the base path is tested.
  4. Use the learning path for runnable follow-up material.