【发布时间】:2016-06-16 15:36:43
【问题描述】:
我在我的应用程序中使用 Spring Batch Framework,我已经成功集成了 Spring Batch Admin。当我尝试为 JdbcTemplate 创建 bean 时。它给了我以下错误:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSourceInitializer': Invocation of init method failed; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [javax.sql.DataSource] is defined: expected single matching bean but found 2: dataSource,phoenixDataSource
Spring Batch Admin 使用“dataSource”,而“phoenixDataSource”由我创建。我如何区分两者,有没有办法将@Qualifier 提供给 BatchAdmin 使用的数据源。
【问题讨论】:
标签: spring datasource spring-batch spring-batch-admin