fix(rotate-token): 加确认步骤、velocity 热加载免踢人,补齐 registry/forwarding/db 轮换

This commit is contained in:
Lemon-miaow committed 2026-09-27 10:50:11 +08:00
1 parent d112a43c65
commit 2d04e0e637
16 files changed
+1568 -195

No files matched your search

@@ -9,6 +9,7 @@ import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Locale;
import java.util.Properties;
import java.util.function.Consumer;
/**
* FelisVelocityConfig extends the shared link config with the inputs only the full
@@ -62,8 +63,9 @@ final class FelisVelocityConfig {
this.adminHostname = adminHostname;
}
static FelisVelocityConfig load(Path file) throws IOException {
LinkConfig link = LinkConfigLoader.load(file); // url + token (required) + template + validate
// load reads the file; notice hears of a service token replaced in it later.
static FelisVelocityConfig load(Path file, Consumer<String> notice) throws IOException {
LinkConfig link = LinkConfigLoader.load(file, notice); // url + token (required) + template + validate
Properties props = new Properties();
if (Files.exists(file)) {
try (InputStream in = Files.newInputStream(file)) {
@@ -131,7 +131,8 @@ public final class FelisVelocityPlugin {
@Subscribe
public void onProxyInitialize(ProxyInitializeEvent event) {
try {
this.config = FelisVelocityConfig.load(dataDirectory.resolve("felis-link.properties"));
this.config = FelisVelocityConfig.load(dataDirectory.resolve("felis-link.properties"),
msg -> logger.info("Felis: {}", msg));
} catch (Exception e) {
logger.error("Felis disabled: {}", e.getMessage());
return;