Initial pool

This commit is contained in:
Izzel_Aliz
2018-05-07 17:57:22 +08:00
parent 7181c487f9
commit 784b15ea25
19 changed files with 809 additions and 20 deletions

View File

@@ -1,6 +1,10 @@
package com.ilummc.tlib.config;
import com.ilummc.tlib.annotations.Config;
import lombok.Getter;
import java.util.HashMap;
import java.util.Map;
/**
* @author sky
@@ -9,9 +13,28 @@ import com.ilummc.tlib.annotations.Config;
@Config(name = "tlib.yml", listenChanges = true, readOnly = false)
public class TLibConfig {
private boolean enablePlaceholderHookByDefault = false;
@Getter
private String dataSourceClassName;
@Getter
private String jdbcUrl = "jdbc:h2:file:~/plugins/TabooLib/h2";
@Getter
private String driverClassName;
@Getter
private String username = "";
@Getter
private String password = "";
@Getter
private int maximumPoolSize = 4;
@Getter
private Map<String, Object> settings = new HashMap<String, Object>() {{
put("cachePrepStmts", true);
put("useServerPrepStmts", true);
}};
public boolean isEnablePlaceholderHookByDefault() {
return enablePlaceholderHookByDefault;
}
}