GH-924 - Allow configuring the database type for JDBC event publications - #1804
Open
AdzerKI wants to merge 1 commit into
Open
GH-924 - Allow configuring the database type for JDBC event publications#1804AdzerKI wants to merge 1 commit into
AdzerKI wants to merge 1 commit into
Conversation
…event publications. Introduces spring.modulith.events.jdbc.database-type to statically configure the DatabaseType. If set, the auto-configuration no longer opens a database connection to detect the type, which allows contexts without database access, such as CDS or AOT cache training runs, to bootstrap. Signed-off-by: AdzerKI <silver_cat@list.ru>
AdzerKI
force-pushed
the
gh-924-configurable-database-type
branch
from
August 21, 2026 20:31
ccc6501 to
d439a75
Compare
Author
|
Force-pushed: the commit now carries the DCO sign-off, so the check is green. Two things came with it while the branch was open:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #924.
JdbcEventPublicationAutoConfiguration.databaseType(…)unconditionally opens a database connection to detect theDatabaseType. That breaks application contexts that have to bootstrap without database access — most prominently CDS / JDK AOT cache training runs (-Dspring.context.exit=onRefresh), where Flyway and Liquibase already offer an opt-out.This change introduces
spring.modulith.events.jdbc.database-type. If set, the auto-configuration uses the configured type as is and never touches theDataSource; if not set, the previous detection via connection metadata applies unchanged.Verified with the new unit tests (
JdbcEventPublicationAutoConfigurationUnitTests) and the existing module test suite.