Package io.milton.annotations
Annotation Type Get
-
@Target(METHOD) @Retention(RUNTIME) public @interface Get
Marks a method as one which generates content for the given resourceThe method return type can be
- void, in which case you must write content to the outputStream in the method call
- a byte[] which is written to the output
- an InputStream, which will be written to output, then closed (in a try/finally block)
- a String, which is interpreted as a template name. The ViewResolver is used to locate a template with the given name, and it is invoked with a model object with name "resource"
- a
ModelAndViewwhich is passed to the ViewResolver to execute the template
The input parameters must be:
- first must be the source object
- then any of Request, Response, Range, contentType (String), parameters (Map), OutputStream
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description StringcontentTypeIf specified, will only match on requests with the given content typelongmaxAgeSecsDefault is -1 which means use the system default.String[]paramsIf present, only requests which contain all of the given parameters will be matched
-