Regression in AbstractBatchConfiguration for dataSource Autowiring [BATCH-2819] #796
Labels
in: core
related-to: infrastructure-configuration
status: superseded
Issues that are superseded by other issues
type: bug
Jean-Francois Larouche opened BATCH-2819 and commented
Hi,
This commit:
7a9a2a9#diff-03a06349c3e7d9dcf99d6433a1d565db
When providing our own BatchConfigurer and wiring up the DastaSource correctly, this add a regression when none of the dataSource bean are
@Primary
. Because the SimpleBatchConfigurer is always created.Would it not have been possible to iterate through the Collection inside getConfigurer(...) and just use the DataSource that have a
@Primary
in the list instead? This would have caused 0 regression.Thanks.
New Error:
Field dataSource in org.springframework.batch.core.configuration.annotation.AbstractBatchConfiguration required a single bean, but 2 were found:Field dataSource in org.springframework.batch.core.configuration.annotation.AbstractBatchConfiguration required a single bean, but 2 were found: - batchDataSource: defined by method 'batchDataSource' in class path resource [com/sepaq/batch/config/DataSourceBatchConfig.class] - oracleDataSource: defined by method 'oracleDataSource' in class path resource [com/sepaq/batch/jpa/datasource/DataSourceOracleConfig.class]
Affects: 4.1.1, 4.1.2
The text was updated successfully, but these errors were encountered: