https://github.com/vaadin/vaadin-rest-example
Example of using REST services in a Vaadin application
https://github.com/vaadin/vaadin-rest-example
example rest spring-boot vaadin
Last synced: 15 days ago
JSON representation
Example of using REST services in a Vaadin application
- Host: GitHub
- URL: https://github.com/vaadin/vaadin-rest-example
- Owner: vaadin
- License: unlicense
- Created: 2020-04-21T08:47:13.000Z (about 6 years ago)
- Default Branch: v25
- Last Pushed: 2026-04-02T11:05:18.000Z (27 days ago)
- Last Synced: 2026-04-03T01:20:38.054Z (27 days ago)
- Topics: example, rest, spring-boot, vaadin
- Language: Java
- Homepage: https://vaadin.com/start
- Size: 890 KB
- Stars: 25
- Watchers: 5
- Forks: 8
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Example app for using REST services with Vaadin and Spring Boot

This example application demonstrates three ways of connecting your Vaadin and Spring Boot application to a REST backend. The examples are
1) Using a DTO class to fetch and display all results from a REST API
2) Using dynamic JSON to fetch and display all results from a REST API
3) Calling REST services asynchronously
4) Using a DTO class to lazily fetch and display data from REST on demand
The main class of this app is com.vaadin.example.rest.ui.MainView, where we create our three demos. The UI class uses DTOs and a Spring service located in the com.vaadin.example.rest.data package.
The backend.restprovider package is not part of the demo; it is an implementation of a 3rd party REST API so that we don't need to depend on an actual one. The classes provide a REST API running on localhost, with two API methods, 'count' and 'data'.
## Running the Application
Import the project to the IDE of your choosing as a Maven project.
Run the application using `mvn spring-boot:run` or by running the `Application` class directly from your IDE.
Open http://localhost:8080/ in your browser.
If you want to run the application locally in the production mode, run `mvn spring-boot:run -Pproduction`.
## More Information
- [Vaadin documentation](https://vaadin.com/docs)
- [Using Vaadin and Spring](https://vaadin.com/docs/v14/flow/spring/tutorial-spring-basic.html) article