1. 启用内嵌静态页面, 2. 蓝奏域名规则优化, 3. 反向代理优化, 4. 修复一堆细节问题

This commit is contained in:
qaiu
2024-10-08 02:06:37 +08:00
parent dc42547b73
commit 294e47deed
14 changed files with 470 additions and 341 deletions

View File

@@ -21,7 +21,7 @@ public class JDBCPoolInit {
JsonObject dbConfig;
Vertx vertx = VertxHolder.getVertxInstance();
String url;
private JDBCType type;
private final JDBCType type;
private static JDBCPoolInit instance;
@@ -64,22 +64,17 @@ public class JDBCPoolInit {
* init h2db<br>
* 这个方法只允许调用一次
*/
public void initPool() {
synchronized public void initPool() {
if (pool != null) {
LOGGER.error("pool 重复初始化");
return;
}
// 初始化数据库连接
vertx.createSharedWorkerExecutor("sql-pool-init")
.executeBlocking(() -> {
// 初始化连接池
pool = JDBCPool.pool(vertx, dbConfig);
CreateTable.createTable(pool, type);
return "数据库连接初始化: URL=" + url;
})
.onSuccess(LOGGER::info)
.onFailure(Throwable::printStackTrace);
// 初始化连接池
pool = JDBCPool.pool(vertx, dbConfig);
CreateTable.createTable(pool, type);
LOGGER.info("数据库连接初始化: URL=" + url);
}
/**
@@ -87,7 +82,7 @@ public class JDBCPoolInit {
*
* @return pool
*/
public JDBCPool getPool() {
synchronized public JDBCPool getPool() {
return pool;
}
}