Created
August 1, 2016 04:12
-
-
Save hoangtranwork/b6ebc1d64f5c858945c157d8fa5d0def to your computer and use it in GitHub Desktop.
create connectionSource with MySQL driver v6
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
/** | |
* The data source instance that need to be public so we can close it in on-app-exit hook | |
*/ | |
private DataSource initDataSource(HikariConfig config) { | |
return new HikariDataSource(config); | |
} | |
private ConnectionSource initConnectionSource(DataSource ds) throws SQLException { | |
return new DataSourceConnectionSource(ds, new MySql6DbType()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment