build: 修改 jenkins 环境变量
This commit is contained in:
@@ -11,6 +11,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import redis.clients.jedis.JedisPool;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
import java.net.URI;
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
@@ -50,7 +51,7 @@ public abstract class CoreAPI {
|
||||
scheduledService = Executors.newScheduledThreadPool(1, new NamedThreadFactory("HamsterCore - Scheduler"));
|
||||
|
||||
getLogger().info("正在创建 Redis 连接池");
|
||||
jedisPool = new JedisPool(config.getString("redis-url"));
|
||||
jedisPool = new JedisPool(URI.create(config.getString("redis-url", "redis://localhost:6379/0?clientName=HamsterCore&timeout=5s")));
|
||||
getLogger().info("Redis 连接池创建完成");
|
||||
|
||||
ConfigSection datasourceConfig = config.getSection("datasource");
|
||||
|
Reference in New Issue
Block a user