@Documented @Retention(value=RUNTIME) @Target(value={TYPE,ANNOTATION_TYPE}) @Bean @Executable @DefaultScope(value=javax.inject.Singleton.class) public @interface Controller
Indicates that the role of a class is a controller within an application.
By default all public methods of a controller are considered Executable
and
the necessary classes generated to perform the invocation.
Modifier and Type | Optional Element and Description |
---|---|
java.lang.String[] |
consumes |
java.lang.String |
port
Allows specifying an alternate port to run the controller on.
|
java.lang.String[] |
produces |
java.lang.String |
value
This attribute returns the base URI of the controller
|
@AliasFor(annotation=UriMapping.class, member="value") public abstract java.lang.String value
This attribute returns the base URI of the controller
A value of /
can be used to map a controller
to the root URI.
@AliasFor(annotation=Produces.class, member="value") public abstract java.lang.String[] produces
@AliasFor(annotation=Consumes.class, member="value") public abstract java.lang.String[] consumes
public abstract java.lang.String port
The member is defined as a string to allow resolving the port value from configuration. For example: member="${my.port.number}"