Зафиксировать текущие изменения CORE/CONTENT

This commit is contained in:
AidarKC
2026-11-29 18:16:49 +03:00
parent 3309cdb6ba
commit 09789fdf2f
103 changed files with 692 additions and 2182 deletions
@@ -29,17 +29,23 @@ public final class AppConfig {
}
private void load() {
boolean hasInternalConfig;
try (InputStream in = getClass().getClassLoader().getResourceAsStream("application.properties")) {
if (in == null) {
throw new RuntimeException("Config file application.properties not found");
hasInternalConfig = in != null;
if (hasInternalConfig) {
properties.load(in);
}
properties.load(in);
} catch (IOException e) {
throw new RuntimeException("Failed to load application.properties", e);
}
Path externalConfig = Paths.get("application.properties");
if (!Files.isRegularFile(externalConfig)) {
if (!hasInternalConfig || Files.exists(externalConfig)) {
throw new IllegalStateException("External application.properties missing or not a regular file: "
+ externalConfig.toAbsolutePath()
+ "; copy application.properties.example to the server working directory");
}
return;
}