Releases: Dhi13man/spring-multi-data-source
spring-multi-data-souce:0.1.2
spring-multi-data-souce | v0.1.2
Spring Boot has multiple limitations when using multiple data sources in a single service. This project aims to solve those limitations by providing custom annotations that can be used to generate the required Bean-providing configuration classes and repositories during the build process itself, which the service can then use.
The best part is that the entirety of the generated code is clean, human-readable, and can be directly carried over to the relevant packages of the main code if you no longer wish to be tied down to this library in the future.
Changelog
- HOTFIX: Fix
@EnableJpaRepositories.basePackages
being empty for secondary data sources when@EnableMultiDataSourceConfig.generatedRepositoryPackagePrefix
is not set. Instead, it will be set to the package of the@EnableMultiDataSourceConfig
annotated class followed by.generated.repositories
and then the snake-cased datasource name. - Default
@EnableMultiDataSourceConfig.generatedConfigPackage
changed to the package of the@EnableMultiDataSourceConfig
annotated class followed by.generated.config
instead of@EnableMultiDataSourceConfig.generatedRepositoryPackagePrefix
followed by.config
. - No repositories will be scanned for data sources which do not have a
@TargetDataSource
. - Refactor internal logic for more readability.
Release
spring-multi-data-souce:0.1.1
spring-multi-data-souce | v0.1.1
Spring Boot has multiple limitations when using multiple data sources in a single service. This project aims to solve those limitations by providing custom annotations that can be used to generate the required Bean-providing configuration classes and repositories during the build process itself, which the service can then use.
The best part is that the entirety of the generated code is clean, human-readable, and can be directly carried over to the relevant packages of the main code if you no longer wish to be tied down to this library in the future.
Changelog
PR#13
- BREAKING CHANGE: Configs must be defined for each data source now
under@EnableMultiDataSourceConfig.@DataSourceConfig
. - BREAKING CHANGE:
@MultiDataSourceRepository
has been renamed to@TargetDataSource
for
easier understanding. - Incremented version of Junit and Mockito.
- Restructured DataSource Level configuration for more readability and utility.
PR#11 & PR#12
- Cosmetic improvements to generated code to include a comment explaining hibernate bean container
injection reasoning - Turned utils into singleton classes instead of static classes, and enforced them with Unit Tests.
- Improved documentation