Demo project for integrating Spring Boot and JavaFX. The Demo has the following features:
- Simple working sample code for a small desktop application.
- Configuration for maven or gradle project to use JavaFX with Spring Boot, with the appropriate maven artifact. dependencies for basic development.
- Uses recent, reasonably up-to-date JavaFX modules, with consistent versions.
- Demonstrates placing an FXML file in a resource directory, and looking it up as a resource at runtime.
- Properly separates a controller class from the application class.
- Demonstrates how to bootstrap JavaFX application using Spring Boot.
- Demonstrates how to use Spring Boot features within JavaFX.
- Showcase how to navigate between JavaFX view using a router implementation, heavily inspired on Angular/Router.
The project uses the following technologies:
- Java JDK 21: The latest version of Java Development Kit is used for implementing the application logic.
- JavaFX 21: A software platform for creating and delivering desktop applications.
- Spring Boot v3.2.0: An open source Java-based framework used to create a Micro Service. It is developed by Pivotal Team.
- Java JDK version 21.
- An IDE that supports Java and Spring MVC development, such as IntelliJ IDEA
- Maven or Gradle
- Clone the repository
git clone [email protected]:ehayik/jfx-playground.git
- Open the project folder.
- Run
./mvnw compile
to install the necessary dependencies from the POM file.
- Open the command line and navigate to the project folder.
- To run with maven use
./mvnw spring-boot:run
command. - To run with gradle use
./gradlew bootRun
command.