Browse Source

jfinal 4.3

James 6 years ago
parent
commit
cbe3a64e57

+ 5 - 0
src/main/java/com/jfinal/template/Engine.java

@@ -279,6 +279,11 @@ public class Engine {
 		return this;
 	}
 	
+	public Engine removeSharedObject(String name) {
+		config.removeSharedObject(name);
+		return this;
+	}
+	
 	/**
 	 * Set output directive factory
 	 */

+ 6 - 0
src/main/java/com/jfinal/template/EngineConfig.java

@@ -213,6 +213,12 @@ public class EngineConfig {
 		return sharedObjectMap;
 	}
 	
+	public synchronized void removeSharedObject(String name) {
+		if (sharedObjectMap != null) {
+			sharedObjectMap.remove(name);
+		}
+	}
+	
 	/**
 	 * Set output directive factory
 	 */