A Spring Boot starter for building JavaFX desktop applications with Spring MVC-inspired routing, i18n, and window management.
Full Documentation — guides, reference, and examples.
- Spring MVC-style routing —
@FxRoutes+@FxMapping, just like@RestController+@GetMapping - Nested child routing — Angular-inspired
@RouterOutletfor layouts with swappable child views - Windows and modals — Open routes in new windows or modal dialogs with typed return values
- Internationalization — Spring
MessageSourcebridged to JavaFX'sResourceBundle - Title management — Declarative or programmatic i18n-aware window titles
- Auto-configuration — Everything wired up automatically, override any component with
@ConditionalOnMissingBean
| Component | Version |
|---|---|
| Java | 17+ |
| Spring Boot | 4.0.4 |
| JavaFX | 21.0.5 |
| Lombok | managed by Spring Boot |
| Maven | 3.x (wrapper included) |
<dependency>
<groupId>io.github.vakho10</groupId>
<artifactId>spring-javafx-boot-starter</artifactId>
<version>1.0.0</version>
</dependency>mvn archetype:generate \
-DarchetypeGroupId=io.github.vakho10 \
-DarchetypeArtifactId=spring-javafx-boot-archetype \
-DarchetypeVersion=1.0.0 \
-DgroupId=com.example \
-DartifactId=my-javafx-app@FxRoutes
public class AppRoutes {
@FxMapping("/")
public String layout(FxModel model) {
return "layout";
}
@FxMapping(value = "/main", parent = "/", title = "page.title.main")
public String main(FxModel model) {
model.put("greeting", "Hello!");
return "main";
}
}router.navigateTo("/main");
router.navigateTo("/settings", Map.of("tab", "appearance"));
// Modal with typed result
WindowResult<String> result = router.openModal("/picker",
new WindowOptions().title("Select item").size(400, 300));
result.get().ifPresent(value -> label.setText(value));See the Quickstart guide for a full walkthrough.
| Module | Purpose |
|---|---|
spring-javafx-boot-starter |
Core library — routing, view resolution, i18n bridging, title management |
spring-javafx-boot-demo |
Reference app demonstrating all features including theming, preferences, and error handling |
spring-javafx-boot-archetype |
Maven archetype for scaffolding new projects |
./mvnw clean package
java -jar spring-javafx-boot-demo/target/spring-javafx-boot-demo-1.1.0-SNAPSHOT.jarOr run io.github.vakho10.springjavafxboot.Launcher directly from your IDE.
| Section | Topics |
|---|---|
| Getting Started | Installation, quickstart, project structure |
| Guide | Routing, child routing, windows & modals, i18n, title management |
| Reference | Annotations, configuration properties, auto-configuration |
| Examples | Demo application walkthrough |
See CONTRIBUTING.md for development setup, release process, and Maven Central publishing instructions.
- Dark theme based on JavaFX-Dark-Theme by antoniopelusi
- App icons from icon-icons.com (free icons)
This project is licensed under the MIT License.