com.vaadin.flow.server.
Annotation 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
-
Element Details
-
value
Class<?>[] valueThe 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 isClass<?>
because of a VS Code issue.Returns:
a collection of views to load eagerly or an empty array to load all dependencies eagerly
Default:
{}
-