Back to Exposed

databaseInitializer

docs/api/exposed-spring-boot-starter/org.jetbrains.exposed.v1.spring.boot.autoconfigure/-exposed-auto-configuration/database-initializer.html

1.2.0742 B
Original Source

databaseInitializer

@Bean

@ConditionalOnProperty(value = ["spring.exposed.generate-ddl"], havingValue = "true", matchIfMissing = false)

open fun databaseInitializer(): DatabaseInitializer

Returns a DatabaseInitializer that auto-creates the database schema, if enabled by the property spring.exposed.generate-ddl in the application.properties file.

The property spring.exposed.excluded-packages can be used to ensure that tables in specified packages are not auto-created.

Generated by Dokka © 2026 Copyright