#1063 Add useSSL option
This commit is contained in:
@@ -31,6 +31,7 @@ import java.util.Set;
|
||||
|
||||
public class MySQL implements DataSource {
|
||||
|
||||
private boolean useSSL;
|
||||
private String host;
|
||||
private String port;
|
||||
private String username;
|
||||
@@ -100,6 +101,7 @@ public class MySQL implements DataSource {
|
||||
if (poolSize == -1) {
|
||||
poolSize = Utils.getCoreCount();
|
||||
}
|
||||
this.useSSL = settings.getProperty(DatabaseSettings.MYSQL_USE_SSL);
|
||||
}
|
||||
|
||||
private void setConnectionArguments() {
|
||||
@@ -116,6 +118,9 @@ public class MySQL implements DataSource {
|
||||
ds.setUsername(this.username);
|
||||
ds.setPassword(this.password);
|
||||
|
||||
// Request mysql over SSL
|
||||
ds.addDataSourceProperty("useSSL", useSSL);
|
||||
|
||||
// Encoding
|
||||
ds.addDataSourceProperty("characterEncoding", "utf8");
|
||||
ds.addDataSourceProperty("encoding","UTF-8");
|
||||
|
||||
Reference in New Issue
Block a user