From dfdbe680d9d0b63dc67ec07d6e404e9790c3ab19 Mon Sep 17 00:00:00 2001
From: "1437892690@qq.com" <1437892690@qq.com>
Date: Wed, 2 Jul 2025 14:26:25 +0800
Subject: [PATCH] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E6=9F=A5=E7=9C=8B?=
=?UTF-8?q?=E5=92=8C=E4=B8=8B=E8=BD=BD=E6=97=A5=E5=BF=97=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
关联 #[1444848047980544]查看和下载日志页面 http://192.168.0.96:8090/demo/rdm.html#/story-detail/939050947543040/939050947543042/1444848047980544
---
.../framework/constvalue/SystemProperty.java | 22 +++++++++++++++
.../SystemPropertyNotFoundException.java | 27 +++++++++++++++++++
.../exception/file/FileNotFoundException.java | 23 +++++++++++++++-
3 files changed, 71 insertions(+), 1 deletion(-)
create mode 100644 src/main/java/neatlogic/framework/constvalue/SystemProperty.java
create mode 100644 src/main/java/neatlogic/framework/exception/SystemPropertyNotFoundException.java
diff --git a/src/main/java/neatlogic/framework/constvalue/SystemProperty.java b/src/main/java/neatlogic/framework/constvalue/SystemProperty.java
new file mode 100644
index 000000000..77cfc1fb6
--- /dev/null
+++ b/src/main/java/neatlogic/framework/constvalue/SystemProperty.java
@@ -0,0 +1,22 @@
+/*
+ * Copyright (C) 2025 深圳极向量科技有限公司 All Rights Reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package neatlogic.framework.constvalue;
+
+public class SystemProperty {
+ public final static String LOG4J_HOME = "log4j.home";
+}
diff --git a/src/main/java/neatlogic/framework/exception/SystemPropertyNotFoundException.java b/src/main/java/neatlogic/framework/exception/SystemPropertyNotFoundException.java
new file mode 100644
index 000000000..1042b82fa
--- /dev/null
+++ b/src/main/java/neatlogic/framework/exception/SystemPropertyNotFoundException.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2025 深圳极向量科技有限公司 All Rights Reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package neatlogic.framework.exception;
+
+import neatlogic.framework.exception.core.ApiRuntimeException;
+
+public class SystemPropertyNotFoundException extends ApiRuntimeException {
+
+ public SystemPropertyNotFoundException(String name) {
+ super("nfe.systempropertynotfoundexception.systempropertynotfoundexception", name);
+ }
+}
diff --git a/src/main/java/neatlogic/framework/exception/file/FileNotFoundException.java b/src/main/java/neatlogic/framework/exception/file/FileNotFoundException.java
index ea3f9d88a..8b17a4289 100644
--- a/src/main/java/neatlogic/framework/exception/file/FileNotFoundException.java
+++ b/src/main/java/neatlogic/framework/exception/file/FileNotFoundException.java
@@ -1,10 +1,31 @@
package neatlogic.framework.exception.file;
import neatlogic.framework.exception.core.ApiRuntimeException;
+import neatlogic.framework.util.$;
+import org.apache.commons.lang3.StringUtils;
public class FileNotFoundException extends ApiRuntimeException {
+
+ public enum Type {
+ NONEXISTENT,
+ DIRECTORY,
+ ;
+ }
+
public FileNotFoundException(Long id) {
- super("附件“{0}”不存在", id);
+ super("nfef.filenotfoundexception.filenotfoundexception", id);
}
+ public FileNotFoundException(Type type, String path) {
+ super(getMessage(type, path));
+ }
+
+ private static String getMessage(Type type, String path) {
+ if (type == Type.NONEXISTENT) {
+ return $.t("nfef.filenotfoundexception.getmessage.nonexistent", path);
+ } else if (type == Type.DIRECTORY) {
+ return $.t("nfef.filenotfoundexception.getmessage.directory", path);
+ }
+ return StringUtils.EMPTY;
+ }
}
--
Gitee