Spring Framework

Class ParameterMethodNameResolver

    • Field Detail


        public static final String DEFAULT_PARAM_NAME
        Default name for the parameter whose value identifies the method to invoke: "action".
        See Also:
        Constant Field Values
      • logger

        protected final Log logger
    • Constructor Detail

      • ParameterMethodNameResolver

        public ParameterMethodNameResolver()
    • Method Detail

      • setParamName

        public void setParamName(String paramName)
        Set the name of the parameter whose value identifies the name of the method to invoke. Default is "action".

        Alternatively, specify parameter names where the very existence of each parameter means that a method of the same name should be invoked, via the "methodParamNames" property.

        See Also:
      • setMethodParamNames

        public void setMethodParamNames(String[] methodParamNames)
        Set a String array of parameter names, where the very existence of a parameter in the list (with value ignored) means that a method of the same name should be invoked. This target method name may then be optionally further mapped via the logicalMappings property, in which case it can be considered a logical name only.
        See Also:
      • setLogicalMappings

        public void setLogicalMappings(Properties logicalMappings)
        Specifies a set of optional logical method name mappings. For both resolution strategies, the method name initially comes in from the view layer. If that needs to be treated as a 'logical' method name, and mapped to a 'real' method name, then a name/value pair for that purpose should be added to this Properties instance. Any method name not found in this mapping will be considered to already be the real method name.

        Note that in the case of no match, where the defaultMethodName property is used if available, that method name is considered to already be the real method name, and is not run through the logical mapping.

        logicalMappings - a Properties object mapping logical method names to real method names
      • setDefaultMethodName

        public void setDefaultMethodName(String defaultMethodName)
        Set the name of the default handler method that should be used when no parameter was found in the request
Spring Framework