Annotation Interface EnableAllFrameworkControllers


@Target(TYPE) @Retention(RUNTIME) @Documented @ComponentScan(useDefaultFilters=false, basePackages={"org.broadleafcommerce","com.broadleafcommerce"}, includeFilters=, nameGenerator=BroadleafBeanNameGenerator.class) public @interface EnableAllFrameworkControllers
Enables FrameworkController and FrameworkRestController annotations.

Scan all Broadleaf modules for FrameworkController and FrameworkRestController so that their FrameworkMappings will get included in FrameworkControllerHandlerMapping to provide default implementations of web endpoints.

If only some controllers are desired, then you must individually use EnableFrameworkControllers and EnableFrameworkRestControllers and utilize their excludeFilters property to disable the unwanted controllers. See EnableFrameworkControllers documentation for how to properly use these two annotations together.

DO NOT place this annotation on the same class as another ComponentScan or other annotations that compose ComponentScan such as @SpringBootApplication, as they will conflict when Spring performs annotation composition. Instead, you can create a nested class in your @SprintBootApplication class like this:

 
 @literal @SpringBootApplication
 public class MyApplication {

     @literal @EnableAllFrameworkControllers
     public static class EnableAllBroadleafControllers {}

     public static void main(String[] args) {
         SpringApplication.run(MyApplication.class, args);
     }
 }
 
 
Since:
5.2
Author:
Philip Baggett (pbaggett)
See Also: