Skip to content

Add support for Spring Boot's DataSourceScriptDatabaseInitializer#328

Merged
tomix26 merged 1 commit intomasterfrom
spring-database-initializer
Mar 10, 2026
Merged

Add support for Spring Boot's DataSourceScriptDatabaseInitializer#328
tomix26 merged 1 commit intomasterfrom
spring-database-initializer

Conversation

@tomix26
Copy link
Copy Markdown
Collaborator

@tomix26 tomix26 commented Mar 9, 2026

Intercept DataSourceScriptDatabaseInitializer via BeanPostProcessor to integrate with Zonky's optimized template-based database initialization. Uses ThreadLocal DataSource pattern for parallel prefetching support.

  • Add DataSourceScriptDatabaseExtension (BeanPostProcessor)
  • Add DataSourceScriptDatabasePreparer with field-by-field equals/hashCode
  • Add ThreadLocalDataSource for thread-safe DataSource delegation
  • Extract AbstractDelegatingDataSource from AbstractEmbeddedDatabase
  • Add Spring Boot 4 stubs for compile-time compatibility
  • Add integration tests for both SB3 and SB4
  • Add zonky.test.database.spring.optimized-sql-init.enabled property (default: true)
  • Update configuration metadata with new property and provider deprecations
  • Update README with Spring Boot SQL Init section

Intercept DataSourceScriptDatabaseInitializer via BeanPostProcessor to
integrate with Zonky's optimized template-based database initialization.
Uses ThreadLocal DataSource pattern for parallel prefetching support.

- Add DataSourceScriptDatabaseExtension (BeanPostProcessor)
- Add DataSourceScriptDatabasePreparer with field-by-field equals/hashCode
- Add ThreadLocalDataSource for thread-safe DataSource delegation
- Extract AbstractDelegatingDataSource from AbstractEmbeddedDatabase
- Add Spring Boot 4 stubs for compile-time compatibility
- Add integration tests for both SB3 and SB4
- Add zonky.test.database.spring.optimized-sql-init.enabled property (default: true)
- Update configuration metadata with new property and provider deprecations
- Update README with Spring Boot SQL Init section
@tomix26 tomix26 force-pushed the spring-database-initializer branch from ada7e11 to 685e57a Compare March 9, 2026 22:31
@tomix26 tomix26 added this to the 2.8.0 milestone Mar 9, 2026
@tomix26 tomix26 merged commit 3282c8c into master Mar 10, 2026
9 of 10 checks passed
@tomix26 tomix26 added the type: enhancement A general enhancement label Mar 10, 2026
@tomix26 tomix26 deleted the spring-database-initializer branch March 11, 2026 17:23
@tomix26 tomix26 removed the type: enhancement A general enhancement label Mar 12, 2026
@tomix26
Copy link
Copy Markdown
Collaborator Author

tomix26 commented Mar 12, 2026

Follow-up pull request: #332

@tomix26 tomix26 removed this from the 2.8.0 milestone Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant