Skip to content

Instantly share code, notes, and snippets.

@nhniches
Created April 16, 2013 00:07
Show Gist options
  • Save nhniches/5392324 to your computer and use it in GitHub Desktop.
Save nhniches/5392324 to your computer and use it in GitHub Desktop.
show the DB and DB driver in spring
jdbcTemplate.execute(new ConnectionCallback() {
public Object doInConnection(Connection connection) throws SQLException, DataAccessException {
DatabaseMetaData dbmd = connection.getMetaData();
System.out.println("Database version: " + dbmd.getDatabaseProductVersion());
System.out.println("Driver version: " + dbmd.getDriverVersion());
return null;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment