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 -Philla.productionMode=true build
(Windows), or ./gradlew -Philla.productionMode=true build
(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 |
---|---|
frontend/ | Client-side source directory |
index.html | HTML template |
index.ts | Frontend entrypoint, bootstraps a React application |
routes.tsx | React Router routes definition |
MainLayout.tsx | Main layout component, contains the navigation menu, uses App Layout |
views/ | UI view components |
themes/ | Custom CSS styles |
src/main/java/<groupId>/ | Server-side source directory, contains the server-side Java views |
Application.java | Server entry-point |
- Read the documentation at hilla.dev/docs.
- Ask questions on Stack Overflow or join our Discord channel.
- Report issues, create pull requests in GitHub.