mirror of
https://github.com/TuxCoding/FastLogin.git
synced 2025-07-30 10:47:33 +02:00
Fix compiling
This commit is contained in:
@ -3,20 +3,16 @@ package com.github.games647.fastlogin.core.storage;
|
|||||||
import com.github.games647.fastlogin.core.shared.FastLoginCore;
|
import com.github.games647.fastlogin.core.shared.FastLoginCore;
|
||||||
import com.zaxxer.hikari.HikariConfig;
|
import com.zaxxer.hikari.HikariConfig;
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public class MySQLStorage extends SQLStorage {
|
public class MySQLStorage extends SQLStorage {
|
||||||
|
|
||||||
public MySQLStorage(FastLoginCore<?, ?, ?> core, String host, int port, String database, HikariConfig config,
|
public MySQLStorage(FastLoginCore<?, ?, ?> core, String host, int port, String database, HikariConfig config,
|
||||||
Map<String, Object> sslOptions) {
|
boolean useSSL) {
|
||||||
super(core,
|
super(core,
|
||||||
"mysql://" + host + ':' + port + '/' + database,
|
"mysql://" + host + ':' + port + '/' + database,
|
||||||
setParams(config, sslOptions));
|
setParams(config, useSSL));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static HikariConfig setParams(HikariConfig config, Map<String, Object> sslOptions) {
|
private static HikariConfig setParams(HikariConfig config, boolean useSSL) {
|
||||||
boolean useSSL = (boolean) sslOptions.get("useSSL");
|
|
||||||
|
|
||||||
// Require SSL on the server if requested in config - this will also verify certificate
|
// Require SSL on the server if requested in config - this will also verify certificate
|
||||||
// Those values are deprecated in favor of sslMode
|
// Those values are deprecated in favor of sslMode
|
||||||
config.addDataSourceProperty("useSSL", useSSL);
|
config.addDataSourceProperty("useSSL", useSSL);
|
||||||
|
Reference in New Issue
Block a user