title: Is it possible(how) to use different ojdbc drivers on same project using spring data?
body: <p>I have these in my application.properties:</p>
  
  <pre><code>spring.first.datasource.jdbc-url=jdbc:oracle:thin:first-datasource-url
  spring.first.datasource.username=user1
  spring.first.datasource.password=pass1
  spring.first.datasource.driver-class-name=oracle.jdbc.OracleDriver
  
  spring.second.datasource.jdbc-url=jdbc:oracle:thin:second-datasource-url
  spring.second.datasource.username=user2
  spring.second.datasource.password=pass2
  spring.second.datasource.driver-class-name=oracle.jdbc.OracleDriver
  </code></pre>
  
  <p>The problem is that one DB is compatible with ojdbc6 and other compatible with ojbc8.
  Is there any way that I can make explicit the version or the jar for each DataSource configuration?</p>
  
  <p>This is my Config file:</p>
  
  <pre><code>@Configuration
  @EnableTransactionManagement
  @EnableJpaRepositories(
   entityManagerFactoryRef = "firstEntityManagerFactory",
   transactionManagerRef = "firstTransactionManager",
  )
  public class FirstConfiguration {
  
      @Bean(name = "firstDataSource")
      @ConfigurationProperties(prefix = "spring.first.datasource")
      public DataSource dataSource() {
          return DataSourceBuilder.create().build();
      }
  
      @Bean(name = "firstEntityManagerFactory")
      public LocalContainerEntityManagerFactoryBean barEntityManagerFactory(EntityManagerFactoryBuilder builder,
              @Qualifier("firstDataSource") DataSource dataSource) {
          return builder.dataSource(dataSource).build();
      }
  
      @Bean(name = "firstTransactionManager")
      public PlatformTransactionManager firstTransactionManager(
              @Qualifier("firstEntityManagerFactory") EntityManagerFactory firstEntityManagerFactory) {
          return new JpaTransactionManager(firstEntityManagerFactory);
      }
  
      @Bean(name = "firstJdbcTemplate")
      public JdbcTemplate jdbcTemplateFirst(@Qualifier("firstDataSource") DataSource dataSource) {
          return new JdbcTemplate(dataSource);
      }
  
  }
  </code></pre>