Vaadin + Spring Data + Neo4j

Here is a little and simple basic configuration for those who wants to develop application based on Vaadin combined with Neo4j. First you shall download the tools.

1. Eclipse

2. JBoss AS 7.1

3. Install maven plugin for Eclipse

Firstly you need to setup  your eclipse to be able to run JBoss (download and install the Jboss Tools). After the IDE and the server is done then you can go further to setup your project configuration. Please kindly follow the steps below

1. Run Eclipse

2. Create maven project and select maven project and press Next


3. Just click next

4. On the filter you type Vaadin. And select for Vaadin-architype-client version 1.6.1. and Press Next

5. Give your project a name and finish

6. Yeah your vaadin maven project is now created

7. Start up the JBoss server from eclipse

8. Try to publish the application to the server. Don’t forget to include the gwt-user.jar

9. Yes it is now the Vaadin project is ready. Then the next is to setup the spring data framework to enable us to communicate with the application

10.  Edit your pom.xml and add the below dependencies









11. Edit  and add the following code to Web.xml



12. Create application context file

13. Add this to the applicationContext-spring.xml

<context:spring-configured />
 <context:annotation-config />
 <context:component-scan base-package="spring.TestMinimalist"></context:component-scan>
 <neo4j:config storeDirectory="C:/Users/Rio/Java/Neo4JDatabase2" />
 <neo4j:repositories base-package="spring.TestMinimalist"></neo4j:repositories>
 <bean id="myWindow" class="spring.TestMinimalist.MyWindow" ></bean>
 <tx:annotation-driven mode="aspectj" />

14. Create context helper class for spring.

package spring.TestMinimalist;

import org.springframework.context.ApplicationContext;
import javax.servlet.ServletContext;
import com.vaadin.Application;
import com.vaadin.terminal.gwt.server.WebApplicationContext;

public class SpringContextHelper {

private ApplicationContext context;

public SpringContextHelper(Application application) {
 ServletContext servletContext = ((WebApplicationContext) application
 context = WebApplicationContextUtils

public Object getBean(final String beanRef) {
 return context.getBean(beanRef);


15. Now edit your vaadin file application file

package spring.TestMinimalist;

import com.vaadin.Application;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Label;
import com.vaadin.ui.Window;

public class MyVaadinApplication extends Application
 private Window window;

 public void init()
 SpringContextHelper contextHelper = new SpringContextHelper(this);
 MyWindow myWindow = (MyWindow)contextHelper.getBean("myWindow");



15. Here is the full directory list of my project

That is all the configuration needed, After all the setting required then you can publish to your web server to play on. To access the database i will explain it on the different post. you can find my full directory of my project on this link


  1. Hi,

    I have been looking for a way to combine this three vaadin + neo4j + spring, so thanks a lot, i’m really and impatiently waiting for the folow up post on database acces on neo4j with an exemple minimalist app

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s