This project can be used as a starting point to create your own Hilla application with React, Spring Boot, and Gradle. It contains all the necessary configuration and some placeholder files to get you started.
The project is a standard Gradle Spring Boot project.
To run it from the command line, type gradlew bootRun
(Windows), or ./gradlew bootRun
(Mac & Linux), then open http://localhost:8080 in your browser.
You can also import the project to your IDE of choice as you would with any Gradle project.
Then you can run the main method of Application.java
.
To create a production build, call gradlew clean build -Pvaadin.productionMode
(Windows), or ./gradlew clean build -Pvaadin.productionMode
(Mac & Linux).
This will build a JAR file with all the dependencies and front-end resources, ready to be deployed.
The file can be found in the build/libs/
folder after the build completes.
Once the JAR file is built, you can run it using:
java -jar build/libs/skeleton-starter-hilla-react-gradle.jar
Directory | Description |
---|---|
src/main/frontend/ | Client-side source directory |
index.html | HTML template |
views/ | UI view components |
@index.tsx | Hello World component |
@layout.tsx | Main layout component, contains the navigation menu, uses App Layout |
themes/ | Custom CSS styles |
src/main/java/<groupId>/ | Server-side source directory, contains the server-side endpoint |
Application.java | Server entry-point |
- Read the documentation at vaadin.com/docs.
- Ask questions on Stack Overflow or join our Forum.
- Report issues, create pull requests in GitHub.