Annotation Interface EnableProxyApiController
@Configuration
@Documented
@Retention(RUNTIME)
@Target(TYPE)
@Import({ProxyApiFindConfig.class,ApiFindRegistrar.class})
public @interface EnableProxyApiController
Enables the
proxy-api-controller framework in a Spring Boot application.
Add this annotation to any @Configuration class (typically the
application's main class) to activate the dynamic REST controller infrastructure.
It imports ProxyApiFindConfig (component scan + utilities) and
ApiFindRegistrar (bean registration for interfaces annotated with
ApiFindController).
Usage
@SpringBootApplication
@EnableProxyApiController(basePackages = "com.example.controller")
public class MyApplication {
public static void main(String[] args) {
SpringApplication.run(MyApplication.class, args);
}
}
- Author:
- Francesco Baldi
- See Also:
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionClass<?>[]Type-safe alternative tobasePackages(): the package of each specified class is used as a scan root.String[]Base packages to scan for interfaces annotated withApiFindController.Class<?>[]Specific controller interface classes to register directly, bypassing the classpath scan.Class<?>[]Additional configuration classes to import into the application context.String[]Alias forbasePackages().
-
Element Details
-
value
String[] valueAlias forbasePackages().- Returns:
- base packages to scan for
@ApiFindControllerinterfaces
- Default:
{}
-
basePackages
String[] basePackagesBase packages to scan for interfaces annotated withApiFindController.- Returns:
- the packages to scan; defaults to the package of the annotated class
- Default:
{}
-
basePackageClasses
Class<?>[] basePackageClassesType-safe alternative tobasePackages(): the package of each specified class is used as a scan root.- Returns:
- marker classes whose packages should be scanned
- Default:
{}
-
defaultConfiguration
Class<?>[] defaultConfigurationAdditional configuration classes to import into the application context.- Returns:
- extra configuration classes; empty by default
- Default:
{}
-
clients
Class<?>[] clientsSpecific controller interface classes to register directly, bypassing the classpath scan.- Returns:
- controller interface classes to register; empty by default
- Default:
{}
-