goja-web/src/main/java/goja/plugins/shiro/ShiroPlugin.java
private String createActionKey(Class<? extends Controller> controllerClass,
                                   Method method, String controllerKey) {
        String methodName = method.getName();
        String actionKey;

        ActionKey ak = method.getAnnotation(ActionKey.class);
        if (ak != null) {
            actionKey = ak.value().trim();
            if (Strings.isNullOrEmpty(actionKey)) {
                throw new IllegalArgumentException(controllerClass.getName()
                        + "."
                        + methodName
                        + "(): The argument of ActionKey can not be blank.");
            }
            if (!actionKey.startsWith(SLASH)) {
                actionKey = SLASH + actionKey;
            }
        } else if (methodName.equals("index")) {
            actionKey = controllerKey;
        } else {
            actionKey =
                    controllerKey.equals(SLASH) ? SLASH + methodName : controllerKey + SLASH + methodName;
        }
        return actionKey;
    }
private String createActionKey(Class<? extends Controller> controllerClass,
                                   Method method, String controllerKey) {
        String methodName = method.getName();
        String actionKey;

        ActionKey ak = method.getAnnotation(ActionKey.class);
        if (ak != null) {
            actionKey = ak.value().trim();
            if (Strings.isNullOrEmpty(actionKey)) {
                throw new IllegalArgumentException(controllerClass.getName()
                        + "."
                        + methodName
                        + "(): The argument of ActionKey can not be blank.");
            }
            if (!actionKey.startsWith(SLASH)) {
                actionKey = SLASH + actionKey;
            }
        } else if (methodName.equals("index")) {
            actionKey = controllerKey;
        } else {
            actionKey =
                    controllerKey.equals(SLASH) ? SLASH + methodName : controllerKey + SLASH + methodName;
        }
        return actionKey;
    }
private String createActionKey ( Class < ? extends Controller > controllerClass , Method method , String controllerKey ) { String methodName = method . getName ( ) ; String actionKey ; ActionKey ak = method . getAnnotation ( ActionKey . class ) ; if ( ak != null ) { actionKey = ak . value ( ) . trim ( ) ; if ( Strings . isNullOrEmpty ( actionKey ) ) { throw new IllegalArgumentException ( controllerClass . getName ( ) + "." + methodName + "(): The argument of ActionKey can not be blank." ) ; } if ( ! actionKey . startsWith ( SLASH ) ) { actionKey = SLASH + actionKey ; } } else if ( methodName . equals ( "index" ) ) { actionKey = controllerKey ; } else { actionKey = controllerKey . equals ( SLASH ) ? SLASH + methodName : controllerKey + SLASH + methodName ; } return actionKey ; }
构建actionkey，参考ActionMapping中的实现。
构建actionkey，参考ActionMapping中的实现。