@Target(value={METHOD,TYPE})
@Retention(value=RUNTIME)
@Documented
public @interface HandlerMapping
Title: HandleMethod.java
Description:
bboss workgroup
Copyright (c) 2007
| 限定符和类型 | 可选元素和说明 |
|---|---|
HttpMethod[] |
method
The HTTP request methods to map to, narrowing the primary mapping:
GET, POST, HEAD, OPTIONS, PUT, DELETE, TRACE.
|
java.lang.String[] |
params |
java.lang.String[] |
value
The primary mapping expressed by this annotation.
|
public abstract java.lang.String[] value
In a Servlet environment: the path mapping URIs (e.g. "/myPath.do"). Ant-style path patterns are also supported (e.g. "/myPath/*.do"). At the method level, relative paths (e.g. "edit.do") are supported within the primary mapping expressed at the type level.
In a Portlet environment: the mapped portlet modes (i.e. "EDIT", "VIEW", "HELP" or any custom modes).
Supported at the type level as well as at the method level! When used at the type level, all method-level mappings inherit this primary mapping, narrowing it for a specific handler method.
In case of Servlet-based handler methods, the method names are
taken into account for narrowing if no path was specified explicitly,
according to the specified
MethodNameResolver
(by default an
InternalPathMethodNameResolver).
Note that this only applies in case of ambiguous annotation mappings
that do not specify a path mapping explicitly. In other words,
the method name is only used for narrowing among a set of matching
methods; it does not constitute a primary path mapping itself.
If you have a single default method (without explicit path mapping), then all requests without a more specific mapped method found will be dispatched to it. If you have multiple such default methods, then the method name will be taken into account for choosing between them.
public abstract HttpMethod[] method
Supported at the type level as well as at the method level! When used at the type level, all method-level mappings inherit this HTTP method restriction (i.e. the type-level restriction gets checked before the handler method is even resolved).
Currently only supported in Servlet environments! To be supported for Portlet 2.0 resource requests in Bboss 3.0 as well.