title: Add new conection to database in Jhipster
body: <p>I need to do a new database connection in a Jhipster project, I am doing the next</p>
  
  <p>Add in application-dev.yml:</p>
  
  <pre><code> datasource:
      driver-class-name: org.postgresql.ds.PGSimpleDataSource
      url: jdbc:postgresql://localhost:5432/analytics
      name: analytics
      username: elser
      password: ******
   datasources:    
      elser:
          driver-class-name: org.hibernate.dialect.PostgreSQLDialect
          url: jdbc:postgresql://localhost:5432/elser
          name: elser
          username: elser
          password: ******
  </code></pre>
  
  <p>And in DatabaseConfiguration.java:</p>
  
  <pre><code>@Bean
  @ConfigurationProperties(prefix="spring.datasources.elser")
  public DataSource dataSourceElser() {
      return DataSourceBuilder.create().build();
  }
  </code></pre>
  
  <p>I added a new class to test this:</p>
  
  <pre><code>@Inject
  @Qualifier("dataSourceElser")
  private DataSource dataSourceElser;
  
  private JdbcTemplate jdbcTemplate;
  
  @PostConstruct
  public void init() {
      jdbcTemplate = new JdbcTemplate(dataSourceElser);
  
      int rowCount = this.jdbcTemplate.queryForObject("select count(*)       from commons.usuario", Integer.class);
      System.out.println(rowCount);
  }
  </code></pre>
  
  <p>But its giving me the next error:</p>
  
  <pre><code> java.sql.SQLException: org.hibernate.dialect.PostgreSQLDialect cannot be cast to java.sql.Driver
  </code></pre>