Replies: 4 comments
-
Hmm. I get this request/attempt pretty often - folks trying to integrate Spring Boot into a desktop app. This scenario (Spring Boot + SQLite) seems pretty popular. Question - are you trying to build a UI with Spring Boot as well? e.g. Thymeleaf? Just stepping back a bit - what are you trying to do here? I've been pondering building an "official" version of the template specifically for this scenario. I think the main two scenarios are a) a background app that lives in the system tray and b) basically something like Tauri+Rust but instead it's more like Electron for Java. In the b) scenario which I'm going to call "BootFX" going forward, the template would likely bundle the JavaFX embedded web browser and point it at a preconfigured Spring Boot app. Developers would mainly just build a Spring Boot app w/Thymeleaf like normal, but if they wanted to do more "desktop" stuff they can fall back on regular desktop Java/JavaFX stuff. Whaddya think? What are you trying to build? |
Beta Was this translation helpful? Give feedback.
-
I am just building simple concept apps like color detector and clipboard manager and wanted to have a better developer expierence with jpa and dependency injections. is the branch that was mentioned in previous issue fully removed or is there an example still available? I dont think I would use the web based components of spring like Thymleaf or run it as a web server personally but I think jpa + sqlite would be an awesome addition. |
Beta Was this translation helpful? Give feedback.
-
Not sure what's up with that branch or where it went. Conceptually, it's pretty easy. Just grab that main method from your Spring Boot app and instead have it be part of the Swing or JavaFX launch. You almost certainly will want to route System.out/System.err to a log file at the very beginning of your launch (before you start up Spring Boot and Swing/JavaFX) so you will be able to figure out launch related errors. Eventually you will to get fancier with integration (e.g. adding listeners to the Spring/Spring Boot application life cycle to add nicer UI) but that is (as they say) just work. |
Beta Was this translation helpful? Give feedback.
-
I have a PoC toy-project that uses springboot for no reason. It's only using the IoC container to glue stuff together. It has a collection of different deployments and the aot-compiled on is using spring-native, but that's a different story. Never found the time to add this maven-jpackage-template to the deploy section though :( |
Beta Was this translation helpful? Give feedback.
-
I am having problems impleting spring boot + jpa into your maven-jpackage template.
I saw there was a branch which is missing https://github.com/wiverson/maven-jpackage-template/tree/spring-boot-test is there a way to still check it out
I managed to implemenet spring boot without jpa as seen here but when trying to implement jpa with sql lite I am getting problems in production build for example.
Log
:: Spring Boot :: (v2.7.4)Beta Was this translation helpful? Give feedback.
All reactions