Bump dependency versions
This commit is contained in:
parent
22fba0c172
commit
17da2807cf
@ -86,7 +86,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.spigotmc</groupId>
|
<groupId>org.spigotmc</groupId>
|
||||||
<artifactId>spigot-api</artifactId>
|
<artifactId>spigot-api</artifactId>
|
||||||
<version>1.12-R0.1-SNAPSHOT</version>
|
<version>1.12.2-R0.1-SNAPSHOT</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- Vault -->
|
<!-- Vault -->
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.kyori</groupId>
|
<groupId>net.kyori</groupId>
|
||||||
<artifactId>text</artifactId>
|
<artifactId>text</artifactId>
|
||||||
<version>1.11-1.2.0</version>
|
<version>1.11-1.3.0</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
@ -104,7 +104,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.zaxxer</groupId>
|
<groupId>com.zaxxer</groupId>
|
||||||
<artifactId>HikariCP</artifactId>
|
<artifactId>HikariCP</artifactId>
|
||||||
<version>2.7.1</version>
|
<version>2.7.3</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- Jedis -->
|
<!-- Jedis -->
|
||||||
@ -146,7 +146,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.ben-manes.caffeine</groupId>
|
<groupId>com.github.ben-manes.caffeine</groupId>
|
||||||
<artifactId>caffeine</artifactId>
|
<artifactId>caffeine</artifactId>
|
||||||
<version>2.5.6</version>
|
<version>2.6.0</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- Lombok -->
|
<!-- Lombok -->
|
||||||
|
@ -32,13 +32,13 @@ import lombok.Getter;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public enum Dependency {
|
public enum Dependency {
|
||||||
|
|
||||||
CAFFEINE("com.github.ben-manes.caffeine", "caffeine", "2.5.6"),
|
CAFFEINE("com.github.ben-manes.caffeine", "caffeine", "2.6.0"),
|
||||||
MARIADB_DRIVER("org.mariadb.jdbc", "mariadb-java-client", "2.0.3"),
|
MARIADB_DRIVER("org.mariadb.jdbc", "mariadb-java-client", "2.2.0"),
|
||||||
MYSQL_DRIVER("mysql", "mysql-connector-java", "5.1.44"),
|
MYSQL_DRIVER("mysql", "mysql-connector-java", "5.1.44"),
|
||||||
POSTGRESQL_DRIVER("org.postgresql", "postgresql", "9.4.1212"),
|
POSTGRESQL_DRIVER("org.postgresql", "postgresql", "9.4.1212"),
|
||||||
H2_DRIVER("com.h2database", "h2", "1.4.196"),
|
H2_DRIVER("com.h2database", "h2", "1.4.196"),
|
||||||
SQLITE_DRIVER("org.xerial", "sqlite-jdbc", "3.20.0"),
|
SQLITE_DRIVER("org.xerial", "sqlite-jdbc", "3.20.1"),
|
||||||
HIKARI("com.zaxxer", "HikariCP", "2.7.1"),
|
HIKARI("com.zaxxer", "HikariCP", "2.7.3"),
|
||||||
SLF4J_SIMPLE("org.slf4j", "slf4j-simple", "1.7.25"),
|
SLF4J_SIMPLE("org.slf4j", "slf4j-simple", "1.7.25"),
|
||||||
SLF4J_API("org.slf4j", "slf4j-api", "1.7.25"),
|
SLF4J_API("org.slf4j", "slf4j-api", "1.7.25"),
|
||||||
MONGODB_DRIVER("org.mongodb", "mongo-java-driver", "3.5.0"),
|
MONGODB_DRIVER("org.mongodb", "mongo-java-driver", "3.5.0"),
|
||||||
|
@ -48,9 +48,13 @@ public abstract class HikariConnectionFactory extends AbstractConnectionFactory
|
|||||||
this.configuration = configuration;
|
this.configuration = configuration;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract String getDriverClass();
|
protected String getDriverClass() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
protected abstract void appendProperties(HikariConfig config);
|
protected void appendProperties(HikariConfig config) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
protected void appendConfigurationInfo(HikariConfig config) {
|
protected void appendConfigurationInfo(HikariConfig config) {
|
||||||
String address = configuration.getAddress();
|
String address = configuration.getAddress();
|
||||||
@ -58,17 +62,13 @@ public abstract class HikariConnectionFactory extends AbstractConnectionFactory
|
|||||||
address = addressSplit[0];
|
address = addressSplit[0];
|
||||||
String port = addressSplit.length > 1 ? addressSplit[1] : "3306";
|
String port = addressSplit.length > 1 ? addressSplit[1] : "3306";
|
||||||
|
|
||||||
String database = configuration.getDatabase();
|
|
||||||
String username = configuration.getUsername();
|
|
||||||
String password = configuration.getPassword();
|
|
||||||
|
|
||||||
config.setMaximumPoolSize(configuration.getPoolSize());
|
config.setMaximumPoolSize(configuration.getPoolSize());
|
||||||
config.setDataSourceClassName(getDriverClass());
|
config.setDataSourceClassName(getDriverClass());
|
||||||
config.addDataSourceProperty("serverName", address);
|
config.addDataSourceProperty("serverName", address);
|
||||||
config.addDataSourceProperty("port", port);
|
config.addDataSourceProperty("port", port);
|
||||||
config.addDataSourceProperty("databaseName", database);
|
config.addDataSourceProperty("databaseName", configuration.getDatabase());
|
||||||
config.setUsername(username);
|
config.setUsername(configuration.getUsername());
|
||||||
config.setPassword(password);
|
config.setPassword(configuration.getPassword());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -35,8 +35,17 @@ public class MySqlConnectionFactory extends HikariConnectionFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getDriverClass() {
|
protected void appendConfigurationInfo(HikariConfig config) {
|
||||||
return "com.mysql.jdbc.jdbc2.optional.MysqlDataSource";
|
String address = configuration.getAddress();
|
||||||
|
String[] addressSplit = address.split(":");
|
||||||
|
address = addressSplit[0];
|
||||||
|
String port = addressSplit.length > 1 ? addressSplit[1] : "3306";
|
||||||
|
String database = configuration.getDatabase();
|
||||||
|
|
||||||
|
config.setMaximumPoolSize(configuration.getPoolSize());
|
||||||
|
config.setJdbcUrl("jdbc:mysql://" + address + ":" + port + "/" + database);
|
||||||
|
config.setUsername(configuration.getUsername());
|
||||||
|
config.setPassword(configuration.getPassword());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -34,16 +34,6 @@ public class PostgreConnectionFactory extends HikariConnectionFactory {
|
|||||||
super("PostgreSQL", configuration);
|
super("PostgreSQL", configuration);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected String getDriverClass() {
|
|
||||||
return "org.postgresql.ds.PGSimpleDataSource";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void appendProperties(HikariConfig config) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void appendConfigurationInfo(HikariConfig config) {
|
protected void appendConfigurationInfo(HikariConfig config) {
|
||||||
String address = configuration.getAddress();
|
String address = configuration.getAddress();
|
||||||
@ -56,7 +46,7 @@ public class PostgreConnectionFactory extends HikariConnectionFactory {
|
|||||||
String password = configuration.getPassword();
|
String password = configuration.getPassword();
|
||||||
|
|
||||||
config.setMaximumPoolSize(configuration.getPoolSize());
|
config.setMaximumPoolSize(configuration.getPoolSize());
|
||||||
config.setDataSourceClassName(getDriverClass());
|
config.setDataSourceClassName("org.postgresql.ds.PGSimpleDataSource");
|
||||||
config.addDataSourceProperty("serverName", address);
|
config.addDataSourceProperty("serverName", address);
|
||||||
config.addDataSourceProperty("portNumber", port);
|
config.addDataSourceProperty("portNumber", port);
|
||||||
config.addDataSourceProperty("databaseName", database);
|
config.addDataSourceProperty("databaseName", database);
|
||||||
|
Loading…
Reference in New Issue
Block a user