Explorar el Código

fix #2355 add fess.system.

Shinsuke Sugaya hace 5 años
padre
commit
ba0ff8b075

+ 2 - 0
src/main/java/org/codelibs/fess/Constants.java

@@ -439,4 +439,6 @@ public class Constants extends CoreLibConstants {
     public static final String FESS_LOG_LEVEL = "fess.log.level";
     public static final String FESS_LOG_LEVEL = "fess.log.level";
 
 
     public static final String TRACK_TOTAL_HITS = "track_total_hits";
     public static final String TRACK_TOTAL_HITS = "track_total_hits";
+
+    public static final String SYSTEM_PROP_PREFIX = "fess.system.";
 }
 }

+ 2 - 2
src/main/java/org/codelibs/fess/mylasta/direction/FessProp.java

@@ -164,11 +164,11 @@ public interface FessProp {
     }
     }
 
 
     default String getSystemProperty(final String key) {
     default String getSystemProperty(final String key) {
-        return ComponentUtil.getSystemProperties().getProperty(key);
+        return ComponentUtil.getSystemProperties().getProperty(key, System.getProperty(Constants.SYSTEM_PROP_PREFIX + key));
     }
     }
 
 
     default String getSystemProperty(final String key, final String defaultValue) {
     default String getSystemProperty(final String key, final String defaultValue) {
-        return ComponentUtil.getSystemProperties().getProperty(key, defaultValue);
+        return ComponentUtil.getSystemProperties().getProperty(key, System.getProperty(Constants.SYSTEM_PROP_PREFIX + key, defaultValue));
     }
     }
 
 
     default void setSystemProperty(final String key, final String value) {
     default void setSystemProperty(final String key, final String value) {