Home

Awesome

VaadinSpringShiroMongoDB

This is an example project based on the vaadin application example archetype to show how to integrate vaadin with spring using SpringVaadinIntegration addon with pure java config, Apache shiro security fine grain access and MongoDB Container Addon

Project Structure

The project consists of the following three modules:

The production mode module recompiles the widgetset (obfuscated, not draft), activates production mode for Vaadin with a context parameter in web.xml and contains a precompiled theme. The ui module WAR contains an unobfuscated widgetset, and is meant to be used at development time only.

Workflow

To compile the entire project, run "mvn install" in the parent project.

Other basic workflow steps:

Using a precompiled theme

When developing the UI module, Vaadin can compile the theme on the fly on every application reload, or the theme can be precompiled to speed up page loads.

To precompile the theme run "mvn vaadin:compile-theme" in the ui module. Note, though, that once the theme has been precompiled, any theme changes will not be visible until the next theme compilation or running the "mvn clean" target.

When developing the theme, running the application in the "run" mode (rather than in "debug") in the IDE can speed up consecutive on-the-fly theme compilations significantly.

The production module always automatically precompiles the theme for the production WAR.