Spring with vaadin

Hello ,

I am student in France.

I want to create a Spring Boot app in MVC Model where the view is managed by Vaadin and the request by Spring with @RequestMapping.

I saw that there is a Vaadin Spring Boot but i don’t understand who handle request.

Anyone for help me ?



Why do you want to do that? Vaadin is a component-based UI framework that abstracts away the concept of request. Most of the interactions with the UI that need to go to the server are programmed using listeners with the Vaadin API. You don’t have to worry about requests and responses; that’s one of the strenghts of Vaadin.

There’s of course Spring integration with Vaadin (as Spring is not only MVC) and you can add your own Spring controllers if you want to.
This example
shows how to add Spring REST Controllers in Spring Boot Vaadin applications.

Hope that helps clarifying things a bit :slight_smile:

Hi ,

First thanks for the reply.

I wanted to do that because i have a project in my schoold this year and i have to use REST controllers with srping boot and a technology that use REST ( like Angular JS ). I just have one start level tutorial in Angular JS but I have already use Vaadin with MVP for 5 months then I thought to create an application that uses Vaadin like frontend and Spring JPA with Spring @RequestMapping for backend.

I already knew that Vaadin managed the URLS and events that’s why I was looking for a way around. Thanks for the example you helped me to find a way to mix the two technologies. :slight_smile:

Glad to know it was useful.

It makes sense to add a complexity layer of REST web services when you have a framework such as Angular JS, however, with Vaadin you don’t need this complexity as the UI implementation is just beside your Java backend implementation.

Now, if the purpouse of the project in your school is to also learn REST web services, you could implement the project in two separate applications: One for the back-end (exposed as REST services) and one for the UI (implemented as a Vaadin application). So the Vaadin front-end can use the backend by calling the web services of the back-end implemented with spring REST controllers. Just an idea :slight_smile: Happy coding!