Spring
De nombreuses équipes Java utilisent déjà Spring Boot pour créer des applications. L'intégration de Spring avec webforJ vous permet désormais d'ajouter les composants UI de webforJ aux applications Spring existantes, ou d'utiliser les fonctionnalités de Spring dans de nouveaux projets webforJ.
Vos services, dépôts et configurations Spring fonctionnent normalement. Vos composants webforJ peuvent @Autowired n'importe quel bean Spring. Les dépôts Spring Data se connectent directement aux tables webforJ via SpringDataRepository. Le développement devient plus rapide avec live reload, qui actualise le navigateur lorsque vous modifiez le code.
L'intégration permet aux deux frameworks de faire ce qu'ils font le mieux : Spring gère les préoccupations backend tandis que webforJ s'occupe de l'interface utilisateur.
Topics
Spring Boot
Generate a Spring Boot webforJ project with startforJ or Maven archetypes, or convert an existing WAR project to an embedded Tomcat JAR.
Routage
Inject Spring services and repositories into webforJ @Route classes through constructor injection while keeping a fresh instance per navigation.
Portées
Use WebforjSessionScope, EnvironmentScope, and RouteScope to control bean lifetimes across sessions, browser tabs, and route hierarchies.
Spring Data JPA
Adapt Spring Data JPA repositories to webforJ Table and Repository components with SpringDataRepository, pagination, sorting, and Specifications.
Tâches en arrière-plan
Run Spring @Async services from webforJ views and marshal progress and results back to the UI thread with Environment.runLater.
Tests
Test a webforJ Spring Boot app without a browser with @SpringBootTest and @WebforjTest, with injected beans and Spring Security on routes.
Already running Spring Boot?
Ask the team how webforJ fits into your existing Spring app.
Continuez à apprendre.
CourtCourt · YouTubeTurn an invoice photo into Java data with AI
ArticleStarting a New Java Project: The Decisions That Shape the Stack
ArticleYour Spring Boot app doesn't need a REST API for the UI
ArticleReact with a Java backend: when it fits, and the all-Java option
ArticleThe best web framework for Java in 2026, by job
ArticleStruts to Spring Boot migration with webforJ
ArticlePrimeFaces alternative: rich Java components, no XHTML