Skip to content
javahacks.dev
Vaadin

Vaadin 25 New Features and What Changed for Java Teams

What Vaadin 25 changes for Java teams: the platform baselines, styling and component updates, and what to check in your build before you upgrade.

5 min read
Summarize in AI
Flat illustration of a browser page built from server-side components, with the Vaadin, OpenJDK, Spring and HTML5 logos.

A major Vaadin release rarely changes the way you write a view. It changes what the platform sits on. This post summarises what to expect from Vaadin 25 and what to check, and it assumes JDK 25 and Spring Boot 4. The migration steps are in upgrading Vaadin between major versions.

The baselines

LayerExpectation
Java21 or later, 25 recommended
Spring Boot4.x, with Spring Framework 7
Jakarta EE11 for servlet containers
BuildMaven or Gradle with the Vaadin plugin matching the version

Vaadin follows the platforms it integrates with. If your application is still on Spring Boot 3, upgrade Spring first and Vaadin second, as separate commits, so a failure points at one cause.

What stays the same

The Flow API is the same shape: routes, layouts, components, Binder, data providers. View code written for Vaadin 24 usually compiles unchanged. The server-side state model described in how Flow works is not touched.

Where changes show up

Styling. The Lumo theme and the way CSS is delivered change between majors. A @Theme folder with custom properties often needs a pass, and deprecated Lumo variables are removed. See styling a Vaadin application.

Components. Components are web components, so new releases bring accessibility fixes, new properties and removals of deprecated ones. Compile warnings about deprecated methods are the checklist: fix every one before upgrading.

Custom components. A class extending Component with a JavaScript module depends on the frontend toolchain. Test those first. Writing custom components explains the pieces involved.

Hilla. If you use React views, the TypeScript generator and the React version also move. Read the notes in Hilla for React teams.

A short check list

Shell
./mvnw -q versions:display-property-updates
./mvnw clean verify
./mvnw -Pproduction clean package

The production profile matters because the development server and the production bundle can behave differently, and a blank page after deploy is the classic symptom: production build blank page.

Planning the upgrade as a series of small steps

A major version upgrade goes wrong when it is done in one commit. Split it into steps that each leave the build green. First raise the JDK and run the tests, with the old Vaadin. Second, move Spring Boot or the servlet container to the version Vaadin 25 expects, and run the tests again. Third, change the Vaadin version, regenerate the frontend files and fix the compile errors, which are usually few because the server-side Java API is the stable part. Fourth, run the application and walk through every screen. A failure after step three is then a Vaadin problem, and a failure after step two is a Spring problem, which saves the afternoon spent trying to decide which.

Check the dependency tree after the version change. Third-party add-ons are the usual source of trouble, because an add-on built for an earlier major version may depend on classes that have moved. List your add-ons, check each one's release notes for a compatible version, and decide early what to do about one that is no longer maintained: replace it, fork it or drop the feature.

Frontend build and production mode

The part of a Vaadin build that surprises Java teams is the frontend. Development mode builds quickly and tolerates a lot, while production mode runs a full bundle build with Node tooling that Vaadin downloads or uses from the machine. A project that works in development can fail in production mode on a CI server because of a missing network access, a locked Node version or a path with spaces. Build in production mode on CI from the first day of the upgrade, and cache the frontend dependencies directory between builds so the pipeline stays fast.

After a build, open the application in a browser with the developer tools open and watch the console for warnings about deprecated components or missing styles. A theme that compiled without errors can still render differently, so compare screenshots of the main screens before and after, with the same data.

Testing what changes

Server-side tests that use the Vaadin testing library run without a browser and are quick, so keep them as the first line of defense. Add a small set of browser tests for the flows that matter most, such as login, a form submission and a grid with filtering, because a component update can change the markup without changing any Java API. When a custom component wraps a web component, that wrapper is the most likely place for a break, so test it on its own.

A build check you can run today

Before changing any version, record where you stand. A short script run in the project root prints the current numbers, so you can compare after each step:

Shell
./mvnw -q help:evaluate -Dexpression=java.version -DforceStdout
./mvnw -q dependency:tree -Dincludes=com.vaadin
./mvnw -q -Pproduction package -DskipTests

The first command shows the Java version the build believes it uses, the second lists every Vaadin artifact on the classpath with its version, and the third proves that the production bundle builds before the upgrade, so a later failure is not inherited. Keep the output in the pull request description. A reviewer can then see the before and after without reproducing anything.

Finally, read the official release notes line by line against your own project. A deprecated API that you do not use needs no action, and one that you use in twenty places deserves its own commit, with the replacement applied mechanically and the tests run once after.

Do not skip the smaller steps

If you are two major versions behind, upgrade one major version at a time and stop at each with a green build. Skipping a version saves a day on paper and costs a week when two sets of changes interact and the compile errors have no single cause. The intermediate release notes are also where deprecation warnings first appear, with the replacement named.

Where this does not apply

If your Vaadin application is stable on an older line that still receives security fixes, an upgrade has a cost and no urgent benefit. Plan it around the end of support for your line and the JDK you must run. The authoritative list of changes is in the Vaadin release notes and the Vaadin upgrade guide.

Share

Keep reading

Get new posts by email

We send one email when a new post is published. No spam.

Unsubscribe in one click. No spam, ever.