Annotation Interface LoadDependenciesOnStartup


@Retention(RUNTIME) @Target(TYPE) public @interface LoadDependenciesOnStartup
Defines routes to load eagerly.

All dependencies for the routes you add to this annotation will be loaded when the user first opens the application. Dependencies for other routes will be loaded when the corresponding route is visited the first time.

Define the classes you want to load eagerly as parameters, e.g. @LoadDependenciesOnStartup({MainView.class, TheOtherEntryPointView.class}) to load the MainView and TheOtherEntryPointView.

If you this annotation without any parameters, i.e. @LoadDependenciesOnStartup() then the dependencies for all routes will be loaded on startup.

This annotation must be added to the class implementing AppShellConfigurator.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Class<?>[]
    The views for which to load dependencies when the application is opened for the first time.
  • Element Details

    • value

      Class<?>[] value
      The views for which to load dependencies when the application is opened for the first time.

      Note that all classes must extend Component. The the type is Class<?> because of a VS Code issue.

      Returns:
      a collection of views to load eagerly or an empty array to load all dependencies eagerly
      Default:
      {}