Spring
Veel Java-teams gebruiken al Spring Boot voor het bouwen van applicaties. Spring-integratie met webforJ stelt je nu in staat om de UI-componenten van webforJ toe te voegen aan bestaande Spring-applicaties, of de functies van Spring te gebruiken in nieuwe webforJ-projecten.
Je Spring-services, -repositories en configuraties werken zoals normaal. Je webforJ-componenten kunnen @Autowired elke Spring-bean. Spring Data repositories verbinden direct met webforJ-tabellen via SpringDataRepository. De ontwikkeling gaat sneller met live reload, dat de browser vernieuwt terwijl je de code wijzigt.
De integratie houdt beide frameworks bezig met wat ze het beste doen - Spring behandelt backend-zaken terwijl webforJ de UI afhandelt.
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.
Routering
Inject Spring services and repositories into webforJ @Route classes through constructor injection while keeping a fresh instance per navigation.
Bereiken
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.
Achtergrondtaken
Run Spring @Async services from webforJ views and marshal progress and results back to the UI thread with Environment.runLater.
Testen
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.
Blijf leren
KortKort · YouTubeTurn an invoice photo into Java data with AI
ArtikelStarting a New Java Project: The Decisions That Shape the Stack
ArtikelYour Spring Boot app doesn't need a REST API for the UI
ArtikelReact with a Java backend: when it fits, and the all-Java option
ArtikelThe best web framework for Java in 2026, by job
ArtikelStruts to Spring Boot migration with webforJ
ArtikelPrimeFaces alternative: rich Java components, no XHTML