Created
August 1, 2016 04:10
-
-
Save hoangtranwork/0128142973597904237d814f6ac0b4b6 to your computer and use it in GitHub Desktop.
mysql6 db type to be used with ormlite
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
import com.j256.ormlite.db.MysqlDatabaseType; | |
/** | |
* Created by Hoang on 2016-05-21. | |
*/ | |
class MySql6DbType extends MysqlDatabaseType { | |
@Override | |
protected String getDriverClassName() { | |
return "com.mysql.cj.jdbc.Driver"; | |
} | |
@Override | |
public void loadDriver() { | |
// Do nothing: | |
// Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. | |
// The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary. | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment