Browse Source

1、优化ActionReporter 增加setTitle 方便二开设置自定义输出Title

sdxiaomu 1 year ago
parent
commit
593e5dafb0
1 changed files with 5 additions and 1 deletions
  1. 5 1
      src/main/java/com/jfinal/core/ActionReporter.java

+ 5 - 1
src/main/java/com/jfinal/core/ActionReporter.java

@@ -31,7 +31,7 @@ import com.jfinal.core.paragetter.JsonRequest;
  */
 public class ActionReporter {
 
-	protected static final String title = "\nJFinal-" + Const.JFINAL_VERSION + " action report -------- ";
+	protected static String title = "\nJFinal-" + Const.JFINAL_VERSION + " action report -------- ";
 	protected static final String[] BLANK_STRING_ARRAY = {""};
 	protected static boolean reportAfterInvocation = true;
 	protected static int maxOutputLengthOfParaValue = 512;
@@ -43,6 +43,10 @@ public class ActionReporter {
 		}
 	};
 
+	public static void setTitle(String title) {
+		ActionReporter.title = title;
+	}
+
 	public static void setReportAfterInvocation(boolean reportAfterInvocation) {
 		ActionReporter.reportAfterInvocation = reportAfterInvocation;
 	}