title: Spring - Get driverClassName from bean datasource
body: <p>I have a spring xml file configuring database connection :</p>
  
  <pre><code>&lt;bean name="dataSource" id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"&gt;
      &lt;property name="driverClassName" value="com.mysql.jdbc.Driver" /&gt;
      &lt;property name="url" value="jdbc:mysql://127.0.0.1:3306/****" /&gt;
      &lt;property name="username" value="****" /&gt;
      &lt;property name="password" value="****" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>Why can I get url, username and password but not driverClassName in Java ?</p>
  
  <pre><code>@Autowired
  private DriverManagerDataSource dataSource;
  
  private void connect() {
      // dataSource.getDriverClassName() does not exist
      final String JDBC_DRIVER = "com.mysql.jdbc.Driver";
      final String DB_URL = dataSource.getUrl();
      final String USER = dataSource.getPassword();
      final String PASS = dataSource.getUsername();
  }
  </code></pre>
  
  <p>Thank you !</p>