@Retention(value=RUNTIME) @Target(value=TYPE) @Documented @Inherited public @interface VaadinConfigurable
VaadinConfigurableAspect aspect.
Analogous to Spring's @Configurable annotation,
but causes beans to be autowired into the Spring application context associated with the current
VaadinSession (aka "Vaadin application") by SpringVaadinSessionListener instead of
the Spring application context associated with the servlet context.
For an extra safety check, consider setting ifSessionNotLocked()
where appropriate.
For the this annotation to function properly, @VaadinConfigurable classes must be woven
(either at build time or runtime) using the
AspectJ compiler with the
VaadinConfigurableAspect aspect (included in the dellroad-stuff JAR file), and the
SpringVaadinServlet must be used.
| Modifier and Type | Optional Element and Description |
|---|---|
Autowire |
autowire
Whether and how to automatically autowire dependencies.
|
boolean |
dependencyCheck
Whether to enable dependency checking.
|
ErrorAction |
ifSessionNotLocked
What to do when we discover that the
VaadinSession is not
locked when the annotated bean is constructed. |
boolean |
preConstruction
Whether to inject dependencies prior to constructor execution.
|
String |
value
Configuration bean definition template name, if any.
|
public abstract String value
public abstract Autowire autowire
public abstract boolean dependencyCheck
public abstract boolean preConstruction
public abstract ErrorAction ifSessionNotLocked
VaadinSession is not
locked when the annotated bean is constructed.
For beans that are (or will interact with) Vaadin widgets, containers, etc., this typically
indicates a programming error. In such cases, this property configures what to do, if anything.VaadinSession.getLockInstance()Copyright © 2017. All rights reserved.