You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Vaadin 25 requires Java 21 or later. Java 21 is the latest LTS version of Java. Upgrading to Java 21 might require you to upgrade other dependencies in your application.
22
22
23
23
Spring Boot 4::
24
-
Vaadin 25 uses the latest Spring Boot 4 and Spring Framework 7 versions. This leads to making breaking changes in Spring-based features, compared to earlier Spring Boot 3.5 and Spring Framework 6 versions.
24
+
Vaadin 25 uses the latest Spring Boot 4 and Spring Framework 7 versions. This leads to making breaking changes in Spring-based features, compared to earlier Spring Boot 3.5 and Spring Framework 6 versions. Details can be found in link:https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-4.0-Migration-Guide[Spring Boot 4 Migration Guide].
25
25
26
26
Servlet 6.1::
27
27
Vaadin 25 is based on link:https://jakarta.ee/specifications/servlet/6.1/[Servlet 6.1] specification, which is compatible with link:https://jakarta.ee/specifications/platform/11/[Jakarta EE 11]. When upgrading from Vaadin 24 (Servlet 6 and Jakarta EE10), changes are typically not needed.
@@ -30,7 +30,13 @@ Gradle 8/9::
30
30
Gradle 8 (8.14 and later) and Gradle 9 releases are supported.
31
31
32
32
Jackson 3::
33
-
Elemental has been replaced with Jackson while Jackson version has been updated to 3. This only affects you if the your application uses some of the affected low-level APIs. Details can be found in link:https://github.com/vaadin/flow/issues/21060[Finalize Jackson conversion] and its sub-issues.
33
+
Elemental has been replaced with Jackson while Jackson version has been updated to 3. This only affects you if your application uses some of the affected low-level APIs. Details can be found in link:https://github.com/vaadin/flow/issues/21060[Finalize Jackson conversion] and its sub-issues.
34
+
35
+
Node.js 24::
36
+
Vaadin 25 requires Node.js 24 or later for building the frontend part of the application. Node.js 24 becomes the active LTS before Vaadin 25.0.0 - guaranteeing the longest possible support.
37
+
38
+
React 19::
39
+
Vaadin 25 uses React 19 for the React-based components and views. Details about the changes in React 19 can be found in link:https://react.dev/blog/2024/04/25/react-19-upgrade-guide[React 19 Upgrade Guide].
34
40
35
41
36
42
== Overview
@@ -55,11 +61,6 @@ Ensure your application is not using deprecated code fragments.
55
61
Make sure your application runs well on Java 21 runtime.
56
62
57
63
58
-
== Limitations
59
-
60
-
Portlet and OSGi integrations are not included for two reasons: First, the latest Portlet 3 specification corresponds to Servlet 3, and it doesn't work with Servlet 6.1. Second, a Jakarta EE 10 compatible version of OSGi core runtime https://felix.apache.org/documentation/index.html[Apache Felix 8] is under development. The https://karaf.apache.org/[Apache Karaf] container is based on Apache Felix and doesn't have a Jakarta-compatible version.
61
-
62
-
63
64
== Preparation
64
65
65
66
Upgrade the Vaadin version in the [filename]`pom.xml` and [filename]`gradle.properties` files to the latest release like so:
@@ -85,11 +86,10 @@ See the link:https://github.com/vaadin/platform/releases[list of releases on Git
85
86
86
87
== Spring Upgrade Instructions
87
88
88
-
To browse a full list of changes, see the https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-4.0.0-M3-Release-Notes[Spring-boot 4.0 Release Notes] and the https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-7.0-Release-Notes[What's New in Spring Framework 7.x] page.
89
+
To browse a full list of changes, see the link:https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-4.0.0-M3-Release-Notes[Spring-boot 4.0 Release Notes] and the https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-7.0-Release-Notes[What's New in Spring Framework 7.x] page.
89
90
90
91
The following sections provide a general overview of the changes needed for Spring-based Vaadin applications.
91
92
92
-
93
93
=== Upgrade Spring to Latest
94
94
95
95
You'll need to upgrade Spring to the latest versions, including the starter parent dependency:
@@ -105,16 +105,13 @@ You'll need to upgrade Spring to the latest versions, including the starter pare
105
105
----
106
106
107
107
108
-
=== Deprecation
108
+
=== Security Configuration Changes
109
109
110
-
The deprecated `VaadinWebSecurity` class was removed. Use instead the `VaadinSecurityConfigurer` class for your security configuration. Below is an example of this:
111
-
112
-
[.example]
113
-
--
110
+
The deprecated [classname]`VaadinWebSecurity` class has been removed from Vaadin 25. Use instead the [classname]`VaadinSecurityConfigurer` base class for your security configuration. Below is an example of this:
. If `configure(WebSecurity web)` is overridden you might:
228
232
229
-
/**
230
-
* Demo UserDetailsManager which only provides two hardcoded
231
-
* in-memory users and their roles.
232
-
* This shouldn't be used in real-world applications.
233
-
*/
234
-
@Bean
235
-
public UserDetailsService userDetailsService(
236
-
PasswordEncoder passwordEncoder) {
237
-
InMemoryUserDetailsManager manager = new InMemoryUserDetailsManager();
238
-
manager.createUser(User.withUsername("user")
239
-
.password(passwordEncoder.encode("userPass"))
240
-
.roles("USER").build());
241
-
manager.createUser(User.withUsername("admin")
242
-
.password(passwordEncoder.encode("adminPass"))
243
-
.roles("USER", "ADMIN").build());
244
-
return manager;
245
-
}
233
+
.. Move the rules in the security filter chain bean definition using `HttpSecurity.authorizeRequests()` and remove the original method (recommended by Spring, to prevent skipping all other filters in the chain):
==== Restrict Access By Default For Url-Based Security
326
+
URLs not explicitly specified in security configuration changed from being allowed for authenticated users to restricted by default. This requires extra security rules (path matchers) for URLs that were allowed only for authentication users.
327
+
328
+
==== Deny Access Ff Flow Layout Has No Security Annotation
329
+
Vaadin Flow layouts now require access annotation (e.g. [classname]`RolesAllowed`) on layout classes. This was added to align with auto-layout default security rules.
249
330
250
331
== Java Version
251
332
@@ -291,28 +372,16 @@ java {
291
372
----
292
373
--
293
374
294
-
295
375
== Application Servers
296
376
297
377
Before migrating, find the corresponding version of the Jakarta EE 11-compatible application server used in your project. See link:https://jakarta.ee/compatibility/[Jakarta Compatible Products] for more information.
Vaadin uses the [filename]`{project directory}/src/main/frontend/` directory as the default location for frontend sources. Legacy location [filename]`{project directory}/frontend/` is no longer supported or used automatically [filename]`{project directory}/src/main/frontend/` directory doesn't exist, a warning will be output instead. If you're using the legacy location, you should move your files to the new location, or add the `frontendDirectory` parameter and point it to the legacy location for it to function correctly.
304
-
305
-
306
-
== Polymer Support
307
-
308
-
In Vaadin 25, the `@polymer/polymer` dependency in default `package.json` is removed by default, if polymer-template module is not found from the project. If the application uses Polymer in add-ons may require to add `@NpmPackage(value = "@polymer/polymer", version = "3.5.2")` or add an import to `package.json` explicitly. Details can be found in link:https://github.com/vaadin/flow/issues/21421[Ensure Flow works without Polymer in v25]
309
-
310
-
311
379
== Maven & Gradle Plugins
312
380
313
-
Ensure that the Maven plugins which are explicitly defined in your project, are compatible with Java 21. <TODO: any specific versions to mention?>
381
+
Ensure that the Maven plugins which are explicitly defined in your project, are compatible with Java 21.
382
+
A safe choice: Maven 3.9.11 (or the latest in the 3.9 line) or Maven 4.0.x (once stable) if you are comfortable with that.
314
383
315
-
To run Gradle on top of Java 21 and latest Spring Boot 4 versions, you'll need to use version 8.14 or later. See the https://docs.gradle.org/8.14/release-notes.html[Gradle release notes] for further details. If your project uses Spring Boot, upgrade the plugin `org.springframework.boot` to version 4.0.0.
384
+
To run Gradle on top of Java 21 and latest Spring Boot 4 versions, you'll need to use version 8.14 or later. See the link:https://docs.gradle.org/8.14/release-notes.html[Gradle release notes] for further details. If your project uses Spring Boot, upgrade the plugin `org.springframework.boot` to version 4.0.0.
316
385
317
386
If you're using a Gradle wrapper, update it to version 8.14 by executing the following from the command line:
318
387
@@ -323,17 +392,45 @@ If you're using a Gradle wrapper, update it to version 8.14 by executing the fol
323
392
324
393
For Java 21 compatibility, you may need to update the `sourceCompatibility` setting in your project's build file to version 21. Check your project's build file and make any necessary changes.
325
394
395
+
== TestBench
396
+
397
+
[classname]`ComponentTester` in UI Unit test has been updated to prove a common [methodname]`void click()` method. However, the new method clashes with a similar existing method in [classname]`AnchorTester` and [classname]`RouterLinkTester` that returns an [classname]`HasElement` instance as a result of the navigation. Existing tests that rely on the return type have to migrate to the new [methodname]`navigate()` method; if the return value is not used, there is no need for changes.
398
+
399
+
Because of the change, the [classname]`com.vaadin.flow.component.html.testbench.ClickHandler` class has been removed. The interface, meant to be used with [classname]`ComponentTester` subclasses, should not be needed anymore. In this case, [classname]`com.vaadin.testbench.unit.Clickable` is a valid substitute.
400
+
326
401
== Quarkus
327
402
328
403
Vaadin Quarkus extension is changed to build production package by default. No need for production profile with exclusions for development tools in Maven configurations because Vaadin Quarkus extension has build-in Vaadin plugin handling production packaging.
329
404
330
-
To allow project to keep build configuration unchanged, Vaadin Quarkus extension has `vaadin.build.enabled` property to change the default behaviour. Disable Vaadin plugin by adding `vaadin.build.enabled=false` in `application.properties` file to keep using profile based configuration.
405
+
To allow project to keep build configuration unchanged, Vaadin Quarkus extension has `vaadin.build.enabled` property to change the default behavior. Disable Vaadin plugin by adding `vaadin.build.enabled=false` in `application.properties` file to keep using profile based configuration.
331
406
332
-
== Removed Deprecations
407
+
== Binder
408
+
[methodname]`Binder.validate()` implementation has been changed to behave as its javadoc states. In other words, [methodname]`Binder.validate()` no longer fails when bean level validators have been configured but no bean is currently set (i.e. [classname]`Binder` is used in buffered mode).
409
+
410
+
== Server-Side Modality
411
+
[classname]`Dialog` has become less strict and allows background requests to server. Vaadin Flow allows to change this behavior if needed through [methodname]`Dialog.setModality(ModalityMode)` method.
412
+
413
+
== TreeGrid And Hierarchical Data Providers
414
+
Vaadin Flow added support for flat hierarchy in [classname]`TreeGrid` and hierarchical data providers.
415
+
This required some API removal in Vaadin Flow.
333
416
334
-
APIs that were deprecated earlier have now been removed. The following linked GitHub issue lists these removals:
417
+
[classname]`HierarchyMapper` and [classname]`HierarchicalCommunicationController` have been replaced with the new concept - `Cache`. This new class provides a system for storing data in a hierarchical structure while enabling access in a flattened format for client-side consumption. [methodname]`setRequestedRange` and [methodname]`setParentRequestedRange` have been replaced with a single [methodname]`setViewportRange` which spans all hierarchy levels.
418
+
419
+
See link:https://github.com/vaadin/platform/issues/7843[TreeGrid Flat Hierarchy Support] and link:https://github.com/vaadin/flow-components/issues/7269[Improving user and developer experience in TreeGrid] for more details.
420
+
421
+
== Form Filler Add-on
422
+
The link:https://github.com/vaadin/form-filler-addon/issues[Form Filler add-on] has been removed from the Vaadin 25 platform. If your project uses it, you can add it as a separate dependency or get the same functionality with much less code using Spring AI to have the LLM directly populate a Java object that you can then use with e.g. [methodname]`binder.readBean()`.
423
+
424
+
== Polymer Support
425
+
426
+
In Vaadin 25, the `@polymer/polymer` dependency in default `package.json` is removed by default, if polymer-template module is not found from the project. If the application uses Polymer in add-ons may require to add `@NpmPackage(value = "@polymer/polymer", version = "3.5.2")` or add an import to `package.json` explicitly. Details can be found in link:https://github.com/vaadin/flow/issues/21421[Ensure Flow works without Polymer in v25].
427
+
428
+
== Frontend Sources Directory
429
+
Vaadin uses the [filename]`{project directory}/src/main/frontend/` directory as the default location for frontend sources. Legacy location [filename]`{project directory}/frontend/` is deprecated and a warning will be output if it's used. If you're using the legacy location, please move your files to the new location, or add the `frontendDirectory` parameter and point it to the legacy location. Legacy location support will be removed in a future release.
430
+
431
+
== Removed Deprecations
335
432
336
-
- https://github.com/vaadin/flow/issues/21396[Remove deprecated API in Flow 22.0]
433
+
APIs deprecated earlier have now been removed. The following linked GitHub issue lists these removals — link:https://github.com/vaadin/flow/issues/21396[Remove deprecated API in Flow 25.0]
0 commit comments