@Target(value=TYPE) @Retention(value=RUNTIME) @Documented public @interface FrameworkController
This means that if EnableFrameworkControllers is included in the application configuration then classes
annotated with FrameworkController will be component scanned and included in the application context and that
RequestMappings will be added to handler mappings with a lower priority than those found within a class
annotated with Controller. This priority is achieved through FrameworkControllerHandlerMapping having a higher order value than RequestMappingHandlerMapping.
The intention is that you are able to specify controllers and mappings within a framework module as the default endpoint mappings and a client application can essentially override those mappings without causing an ambiguous mapping exception.
Do not use RequestMapping directly on a class with this annotation, instead pass the RequestMapping as the value() of this annotation.
This concept was adapted from @FrameworkEndpoint from Spring Security OAuth 2.
EnableFrameworkControllers| Modifier and Type | Optional Element and Description |
|---|---|
org.springframework.web.bind.annotation.RequestMapping[] |
value
Parent
RequestMapping to use while building the path to endpoints. |
public abstract org.springframework.web.bind.annotation.RequestMapping[] value
RequestMapping to use while building the path to endpoints.
This is the FrameworkController equivalent to specifying Controller
and RequestMapping together.
While this is technically an array, only the first RequestMapping will be used. Since there is no default null for annotations, this had to be created as a list in order to have a sane default.
RequestMappingCopyright © 2016. All rights reserved.