From 6b367afc6a71d973c1cecebb0b653c60461b236d Mon Sep 17 00:00:00 2001 From: Emil Kantis Date: Mon, 16 Jan 2023 15:06:06 +0100 Subject: [PATCH] Document configuration when using Spring starter (#1654) --- exposed-spring-boot-starter/README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/exposed-spring-boot-starter/README.md b/exposed-spring-boot-starter/README.md index 5b08806467..1ca5b0da1a 100644 --- a/exposed-spring-boot-starter/README.md +++ b/exposed-spring-boot-starter/README.md @@ -43,6 +43,21 @@ spring.datasource.username=sa spring.datasource.password=password ``` +### Configuring Exposed +When using this starter, you can customize typical Exposed configuration by registering a [DatabaseConfig](https://github.com/JetBrains/Exposed/blob/master/exposed-core/src/main/kotlin/org/jetbrains/exposed/sql/DatabaseConfig.kt). See the class itself for available configuration options. + +Example: + +```kotlin +@Configuration +class ExposedConfig { + @Bean + fun databaseConfig() = DatabaseConfig { + useNestedTransactions = true + } +} +``` + ## Automatic Schema Creation This starter will create the database schema if enabled automatically using any class that extends `org.jetbrains.exposed.sql.Table`