Spring Stuff
Makes Vaadin and Spring eternally happy together
This add-on contains classes that add some missing "glue" between Vaadin and Spring. In addition, these classes help address the "scope mismatch" between Vaadin application scope and Spring web application context scope that leads to memory leaks when a Vaadin application closes.
Some key features included are:
- A Spring application context for each Vaadin application
- Autowiring of Vaadin and non-Vaadin beans
- @VaadinConfigurable for autowire-on-construction
- Helpers for background thread interaction with Vaadin application beans
- A Spring scope that matches Vaadin application scope
- Memory-leak free Vaadin listeners on non-Vaadin event sources
- Several container and property helper classes
- Auto-generation of container properties from annotations
- Auto-generation of form fields from annotations
Sample code
<?xml version="1.0" encoding="ISO-8859-1"?> <!-- $Id$ --> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:p="http://www.springframework.org/schema/p" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd"> <!-- Activate Spring annotation support --> <context:annotation-config/> <!-- Example of an application-specific bean which gets created and autowired when the application starts and destroyed when the application stops --> <bean class="com.example.MyApplicationBean"/> <!-- This makse the Vaadin application instance itself available in, and autowired by, this context --> <bean class="org.dellroad.stuff.vaadin.ContextApplicationFactoryBean" p:autowire="true"/> </beans>
Links
Compatibility
Was this helpful? Need more help?
Leave a comment or a question below. You can also join
the chat on Discord or
ask questions on StackOverflow.
Version
Version 1.0.659 Released April 9, 2013
- Update vaadin7 package for 7.0+
- Added VaadinApplication.invokeLater()
- Added AbstractUnsizedContainer
- Support Vaadin Touchkit and servlet 2.3 API (issue #18)
- Added VaadinUtil.assertSession()
- Released
- 2013-04-09
- Maturity
- STABLE
- License
- Apache License 2.0
Compatibility
- Framework
- Vaadin 6.2+
- Vaadin 7.0+
- Vaadin 7.1+ in 1.0.688
- Browser
- Browser Independent
Spring Stuff - Vaadin Add-on Directory
Makes Vaadin and Spring eternally happy togetherExample Code
Issue Tracker
Source Code
Discussion Forum
JavaDoc API
Spring Stuff version 1.0.176
Initial release.
Spring Stuff version 1.0.189
- Removed obsolete WebContextApplicationServlet
- Added @VaadinConfigurable and re-targeted VaadinConfigurableAspect to apply to @VaadinConfigurable beans instead of @Configurable beans; this avoids a conflict when doing load-time weaving when spring-aspects.jar is also on the classpath. NOTE: backward-incompatible change.
Spring Stuff version 1.0.284
Version 1.0.284 Released Feb 16, 2012
- Added SpringContextApplication.destroySpringApplication() hook
- Deprecated ContextApplicationFactoryBean
- Relax servlet 3.0 requirement in SpringContextApplication (issue #5)
- Javadoc improvements
Spring Stuff version 1.0.315
Added ContextApplication.invokeLater()
Spring Stuff version 1.0.349
Version 1.0.349 Released April 27, 2012
- Fixed issue with circular autowiring dependencies that include the
SpringContextApplication bean; this also eliminates the requirement
to create custom static get() method in subclass (issue #7)
- Removed deprecated ContextApplicationFactoryBean
- Added some enhancements to PropertyDef
Spring Stuff version 1.0.420
- Added Vaadin 7 versions of Vaadin classes that require change
- Added new Container classes, PropertyExtractor, and sorting to PropertyDef
- Added VaadinApplicationListener.addAsListenerTo()
- Added PropertyDef.cast()
Spring Stuff version 1.0.432
Version 1.0.432 Released June 29, 2012
- SpringContextApplication: add "vaadinContextConfigLocation" init param
- Fix NotSerializableException in ContextApplication (issue #9)
- Catch Spring's EmptyResultDataAccessException as well in AbstractDAO
- Have ContextApplication implement Executor
- Update vaadin7 package for 7.0.0.alpha3
Spring Stuff version 1.0.497
Version 1.0.497 Released August 24, 2012
- Vaadin7: fixed bug preventing ContextApplication.showError() from working
- Vaadin7: Call Application.setCurrent() in ContextApplication.invoke()
- Fixed filtering bug in AbstractSimpleContainer and flaw in SimpleContainer
- Removed non-Vaadin aspects from aop.xml in the Vaadin add-on JAR (issue #12)
- Added VaadinExternalListener, changed VaadinApplicationListener to use it
NOTE: backward-incompatible change.
Spring Stuff version 1.0.507
Version 1.0.550 Released October 19, 2012
- Update vaadin7 package for 7.0.0.beta5
- Added new method @VaadinConfigurable.ifApplicationNotLocked()
- Added new class ErrorAction
- Changed AbstractQueryContainer to make it more easily scalable
NOTE: backward-incompatible change.
Spring Stuff version 1.0.550
Version 1.0.550 Released October 19, 2012
- Update vaadin7 package for 7.0.0.beta5
- Added new method @VaadinConfigurable.ifApplicationNotLocked()
- Added new class ErrorAction
- Changed AbstractQueryContainer to make it more easily scalable
NOTE: backward-incompatible change.
Spring Stuff version 1.0.571
Version 1.0.571 Released November 27, 2012
- Vaadin7: fix bug that broke VaadinApplication.get()
when subclassed
- Vaadin7: remove workaround for Vaadin bug #9946,
which is now fixed
- Update vaadin7 package for 7.0.0.beta10
Spring Stuff version 1.0.594
Version 1.0.594 Released December 14, 2012
- Add default constructors to Abstract*Container hierarchy
- Fixed incorrect maven dependencies (issue #15)
- Add new class VaadinDelayedAction
Spring Stuff version 1.0.659
Version 1.0.659 Released April 9, 2013
- Update vaadin7 package for 7.0+
- Added VaadinApplication.invokeLater()
- Added AbstractUnsizedContainer
- Support Vaadin Touchkit and servlet 2.3 API (issue #18)
- Added VaadinUtil.assertSession()
Spring Stuff version 1.0.688
Version 1.0.688 Released June 28, 2013
- Added SpringVaadinSession.configureBean()
- Update vaadin7 package to Vaadin 7.1.x (note: no longer works for 7.0.x)
Spring Stuff version 1.0.704
- Fixed bug in AbstractUnsizedContainer
- VaadinUtil.invoke() now uses VaadinSession.accessSynchronously()
Spring Stuff version 1.0.744
Version 1.0.744 Released October 11, 2013
- Added @ProvidesProperty annotation and container constructor support
- Added EnumContainer, EnumComboBox, and EnumUtil
- Fixed bug in AbstractUnsizedContainer
- Added WritableResource
Spring Stuff version 1.0.794
Version 1.0.794 Released December 11, 2013
- Renamed SpringVaadinSession -> SpringVaadinSessionListener
NOTE: the above are backward-incompatible changes
- Add new servlet init params "sessionTracking" and "maxSessions"
- Added VaadinSessionContainer
- Added SortingPropertyExtractor
- Added @ProvidesProperty{,Sort} and FieldBuilder
- Back-port some new classes from vaadin7 -> vaadin
Spring Stuff version 1.0.850
Version 1.0.850 Released March 19, 2014
- Update build target to Java 7
- Add Vaadin 6 portlet portability fix (issue #4)
Spring Stuff version 1.0.882
Version 1.0.882 Released May 6, 2014
- Fix bug: VaadinUtil.invokeLater() was sometimes synchronous
- Allow container SimpleItem's to be modified from "below"
- Minor bug fixes
Spring Stuff version 1.0.905
Version 1.0.905 Released July 29, 2014
- Improvements relating to serialization and HTTP sessions with Vaadin 7
- Changed VaadinConfigurable.ifSessionNotLocked default to EXCEPTION
- Fixed VaadinUtil.invokeLater() to run immediately from background
- Revert previous change to VaadinUtil.invokeLater() (issue #19)
Spring Stuff version 1.0.964
Version 1.0.964 Released January 28, 2015
- Make @FieldBuilder.ProvidesField search in super-types for annotated methods
- Fixed bug in MethodAnnotationScanner that allowed duplicate methods
- Added FieldLayout, BlobField, and StringValuePropertyDef