Skip to main content

Updated Vaadin starter to official Spring plugin

Finally came around to update the Spring-Boot Groovy Vaadin Starter to the official Spring plugin. The only major difference now is the handling of the widgetset via annotation instead of configuration.

Also the "close-to-tweetable" example got an update.

// run with `spring run vaadin.groovy`
@Grapes([
@Grab('com.vaadin:vaadin-spring-boot-starter:1.0.0'),
@Grab('com.vaadin:vaadin-archetype-application:7.6.8'),
])
import com.vaadin.ui.*

@com.vaadin.spring.annotation.SpringUI
@com.vaadin.annotations.Theme("valo")
class MyUI extends UI {
        protected void init(com.vaadin.server.VaadinRequest request) {
                setContent(new Label("Hello World!"))
        }
}