Is it possible to pass a variable to the @Qualifier annotation in Spring?
For example,
@Autowried
@Qualifier("datasource_" + "#{jobParameters['datasource.number']}")
private DataSource ds;
I have 10 different databases where my Spring batch job runs everyday. The database number is passed as a job parameter. I want to define the datasource to connect to based on the job parameter.
Thanks!