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
@@ -104,8 +147,70 @@ You'll need to upgrade Spring to the latest versions, including the starter pare
104
147
</parent>
105
148
----
106
149
150
+
== Application Servers
151
+
152
+
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.
153
+
154
+
== Maven & Gradle Plugins
155
+
156
+
Ensure that the Maven plugins which are explicitly defined in your project, are compatible with Java 21.
157
+
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.
158
+
159
+
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.
160
+
161
+
If you're using a Gradle wrapper, update it to version 8.14 by executing the following from the command line:
162
+
163
+
[source,terminal]
164
+
----
165
+
./gradlew wrapper --gradle-version 8.14
166
+
----
167
+
168
+
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.
169
+
170
+
== Quarkus
171
+
172
+
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.
173
+
174
+
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.
175
+
176
+
== Changes In Theming System
177
+
178
+
Vaadin 25 simplifies the theme/styling system to bring it closer to normal/native web development, and minimizes Vaadin-specific peculiarities, while keeping migration from earlier versions as painless as possible.
179
+
180
+
Below are the main highlights of the changes and more detailed instructions are described in link:https://github.com/vaadin/platform/issues/7453[Theming System Renewal].
181
+
182
+
183
+
The special `frontend/themes` folder, and the `components` sub-folder for CSS shadow-DOM injection, is deprecated (but still supported).
184
+
185
+
The [classname]`@Theme` annotation is deprecated. Instead, [classname]`StyleSheet` annotation to be used for loading one or more stylesheets from public static resources locations (e.g. `META-INF/resources/`), whereas [classname]`CssImport` loads one or more stylesheets from the `src/main/frontend/` folder and use mechanisms native to HTML, CSS, and React (e.g. `@import url("morestyles.css")` in CSS).
186
+
187
+
`StyleSheet` annotation is now a recommended way to load Vaadin theme for the application — to be placed on the application class implementing [classname]`AppShellConfigurator`. Below are some examples of how to use it:
188
+
189
+
[source,java]
190
+
----
191
+
// theme selection
192
+
@StyleSheet(Aura.STYLESHEET) // or Lumo.STYLESHEET
193
+
public class Application implements AppShellConfigurator {}
194
+
195
+
// or loading custom styles and theme:
196
+
197
+
@StyleSheet("styles.css")
198
+
public class Application implements AppShellConfigurator {}
199
+
200
+
// then using @import in the src/main/resources/META-INF/resources/styles.css:
201
+
202
+
@import '@vaadin/aura/aura.css';
203
+
// your custom styles go here ...
204
+
205
+
----
206
+
207
+
The [filename]`theme.json` configuration file is deprecated (but still supported, except the `lumoImports` property).
107
208
108
-
=== Security Configuration Changes
209
+
The `themeFor` parameter of the [classname]`@CssImport` annotation (for shadow-DOM injection) is deprecated (but still supported).
210
+
211
+
The special [filename]`document.css` file (for loading styles into the document root in embedded components) is removed as no longer necessary.
212
+
213
+
== Security Configuration Changes
109
214
110
215
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:
111
216
@@ -325,85 +430,15 @@ public class SecurityConfiguration {
325
430
==== Restrict Access By Default For Url-Based Security
326
431
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
432
328
-
==== Deny Access Ff Flow Layout Has No Security Annotation
433
+
==== Deny Access If Flow Layout Has No Security Annotation
329
434
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.
330
435
331
-
== Java Version
332
-
333
-
Java 21 or later is required. Below is an example of how to use this version:
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.
378
-
379
-
== Maven & Gradle Plugins
380
-
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.
383
-
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.
385
-
386
-
If you're using a Gradle wrapper, update it to version 8.14 by executing the following from the command line:
387
-
388
-
[source,terminal]
389
-
----
390
-
./gradlew wrapper --gradle-version 8.14
391
-
----
392
-
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.
394
-
395
436
== TestBench
396
437
397
438
[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
439
399
440
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
441
401
-
== Quarkus
402
-
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.
404
-
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.
406
-
407
442
== Binder
408
443
[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
444
@@ -430,9 +465,4 @@ Vaadin uses the [filename]`{project directory}/src/main/frontend/` directory as
430
465
431
466
== Removed Deprecations
432
467
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]
434
-
435
-
== Side Navigation Replaces AppNav and AppNavItem
436
-
437
-
Some starter projects previously used the `AppNav` and `AppNavItem` components, which relied on the Vaadin Component Factory components, vcf-nav and vcf-nav-item. These Component Factory components are no longer supported and you should replace `AppNav` and `AppNavItem` with their successor, <</components/side-nav#,Side Navigation>>.
438
-
468
+
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