Skip to content

Instantly share code, notes, and snippets.

@hoangtranwork
Created August 1, 2016 04:10
Show Gist options
  • Save hoangtranwork/0128142973597904237d814f6ac0b4b6 to your computer and use it in GitHub Desktop.
Save hoangtranwork/0128142973597904237d814f6ac0b4b6 to your computer and use it in GitHub Desktop.
mysql6 db type to be used with ormlite
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