Created
April 16, 2013 00:07
-
-
Save nhniches/5392324 to your computer and use it in GitHub Desktop.
show the DB and DB driver in spring
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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