Browse Source

getControllerKey() 更名为 getControllerPath()

James 5 years ago
parent
commit
47de47f299

+ 11 - 3
src/main/java/com/jfinal/aop/Invocation.java

@@ -198,12 +198,20 @@ public class Invocation {
 	}
 	
 	/**
-	 * Return the controller key.
+	 * Return the controller path.
 	 */
-	public String getControllerKey() {
+	public String getControllerPath() {
 		if (action == null)
 			throw new RuntimeException("This method can only be used for action interception");
-		return action.getControllerKey();
+		return action.getControllerPath();
+	}
+	
+	/**
+	 * 该方法已改名为 getControllerPath()
+	 */
+	@Deprecated
+	public String getControllerKey() {
+		return getControllerPath();
 	}
 	
 	/**

+ 3 - 3
src/main/java/com/jfinal/aop/InvocationWrapper.java

@@ -127,11 +127,11 @@ class InvocationWrapper extends Invocation {
 	}
 	
 	/**
-	 * Return the controller key.
+	 * Return the controller path.
 	 */
 	@Override
-	public String getControllerKey() {
-		return invocation.getControllerKey();
+	public String getControllerPath() {
+		return invocation.getControllerPath();
 	}
 	
 	/**