@Target(value=TYPE) @Retention(value=RUNTIME) @Documented @SpringComponent @UIScope public @interface SpringUI
UI-subclasses that are to be
automatically detected and configured by Spring. Use it like this:
@SpringUI
public class MyRootUI extends UI {
// ...
}
Or like this, if you want to map your UI to another URL (for example if you
are having multiple UI subclasses in your application):
@SpringUI(path = "/myPath")
public class MyUI extends UI {
// ...
}
The annotated UI will automatically be placed in the UIScope, so
there is no need to add that annotation explicitly.public abstract String path
"/myUI" would be mapped to
"/myContextPath/myVaadinServletPath/myUI". An empty string
(default) will map the UI to the root of the servlet. Within a web
application, there must not be multiple UI sub classes with the same
path.Copyright © 2019 Vaadin Ltd. All Rights Reserved.