github vaadin/flow 24.0.0
Vaadin Flow 24.0.0

latest releases: 24.6.0.alpha4, 24.5.4, 24.6.0.alpha3...
20 months ago

Changes since 23.3.4

All changes

This is a Flow 24.0.0 release for Vaadin 24.0.0.

Flow 24.0.0 is based on Jakarta EE 10 / Servlet 6.0 specifications, uses Spring Framework 6.0 / Spring-boot 3.0 and requires JDK 17+.

Breaking changes

  • Jakarta 10 EE / Servlet 6.0
    This requires the upgrade to a new versions of specifications included into Jakarta 10 and later versions of servlet containers/app servers compatible with Jakarta EE 10, as well as package names change from javax.* to jakarta.*.

    See Vaadin 23 to 24 upgrade instructions for easier upgrade and Jakarta EE 10 Release for more info what's new comparing to older versions.

  • Spring Framework 6.0 and Spring-boot 3.0
    Spring Framework 5 and Spring-boot 2.7 are no longer supported. See the upgrade instruction mentioned above for easier upgrade.

  • Java 17+ is required

  • Vaadin 14 legacy bootstrapping has been removed
    Commit · Pull request

  • Webpack is no longer supported and isn't used for frontend compilation
    Commit · Pull request

  • Deprecated API has been removed
    Commit · Pull request

    See the list of removed API #15665.

  • Upgrade to SLF4J 2.0
    Commit · Pull request

  • VaadinWebSecurityConfigurerAdapter removed
    Commit · Pull request

    WebSecurityConfigurerAdapter was removed in spring-projects/spring-security#10902.

  • Do not perform type checking for TS files from jar files (#15700)

    The TS files that come from JAR files are not under control of the project developer so enforcing project TS rules on them does not make sense. This is similar to "skipLibCheck" used for TS files that are in node_modules. If your project contains a customisations to tsconfig.json file, Vaadin will ask you to manually redo these changes after this file is updated automatically.

  • Use authorizeHttpRequests instead of deprecated authorizeRequests
    Commit · Pull request

    This requires all applications to also change any usage of authorizeRequests to authorizeHttpRequests.

  • Node 18 (npm 9) is required
    Commit · Pull request

    Node 18 is the latest LTS version and what everybody should at least have going forward.

  • Polymer Templates is now commercial
    Commit · Pull request

    The built-in support for Polymer templates is removed in Flow 24. Polymer support is still available in Vaadin 24 for Prime and Enterprise customers under a commercial license. Vaadin 24 provides the conversion tool that can assist you in converting Polymer to Lit templates by automating part of the effort, see https://github.com/vaadin/flow/tree/main/flow-polymer2lit.

  • Remove feature flag for old license checker which is no longer available
    Commit · Pull request

  • Build for production

    • Running build-frontend in Maven or Gradle will automatically set the project into production mode. There is no need to separately specify a productionMode parameter for these (any value specified is ignored)

    • If you have earlier run both prepare-frontend and build-frontend in development mode, you should delete the build-frontend execution or move it to a production profile.

  • Use servlet context path as the default logout url
    Commit · Pull request

    With a root mapped servlet, this changes nothing. For a servlet with a context path, it assumes that you have the whole application in that context and logging out should take you to the root of that application This is a breaking change for applications where you want the logout path to be / even if Vaadin is deployed as /something and you then need to set the logout path explicitly to /.

  • Rename enableDevServer
    Commit · Pull request

    Rename enableDevServer to frontendHotdeploy.

  • Use feature detection to show the unsupported browser page (#15813)
    Commit · Pull request · Issue

    This removes the WebBrowser.isTooOldToFunctionProperly() method as it is no longer possible to determine this information based on the user agent.

New features

  • New development mode with pre-compiled front-end bundle for faster start-up

    The build and start-up time of Vaadin application has been improved by excluding front-end installation and compilations from application's bootstrap. Node.JS doesn't need to be installed on a developer's machine, as well as no need to download npm packages and run the Vite to compile frontend.

    If your project uses only the standard Vaadin Flow components or third-party Vaadin add-ons (e.g., from Vaadin Directory) without client-code, Vaadin skips front-end compilation and uses the default themes and front-end files shipped with the Vaadin platform.

    This is a default mode in Vaadin 24.0. It gives a benefit of faster start-up time, but it doesn't have a hot redeploy feature with Vite development server that is useful in case of heavy front-end development, e.g. in case of custom web components developed with a Lit template. The old development mode with the Vite development server (used in Vaadin 23 and older versions) can be turned ON with the configuration parameter:

    • System property -Dvaadin.frontend.hotdeploy=true
    • Setting vaadin.frontend.hotdeploy=true in application.properties (for Spring-based applications)
    • Configure vaadin-maven-plugin:
       <configuration>
           <frontendHotdeploy>true</frontendHotdeploy>
       </configuration>
    
    • configure jetty-maven-plugin:
       <configuration>
           <systemProperties>
               <vaadin.frontend.hotdeploy>true</vaadin.frontend.hotdeploy>
           </systemProperties>
       </configuration>
    

    Read more about Vaadin development mode.

  • Allow every component to have styles
    Commit · Pull request

    All components are capable of having class names yet you must remember to implement HasStyle every time you create a new component or the class API is missing. The only known exception is a text node which cannot have classes. It is fine if this edge case, which is almost never used, throws an exception from the API

  • Polymer to Lit converter
    Commit · Pull request · Issue

    Introduces a maven/gradle goals to convert Polymer templates to Lit templates in your project. More information is here https://github.com/vaadin/flow/tree/main/flow-polymer2lit.

  • Component locator: click on any UI component and jump to the relevant code in the IDE
    Commit · Pull request
    Commit · Pull request
    Commit · Pull request

    Allows developers to track where any UI components on the page are created/attached/detached in the source code in IDE by opening Dev Tools window and clicking on a component.

  • Support for Spring Native
    Commit · Pull request

    This is the foundation to make Spring Native work.

    Many thanks to @joshlong for help and making this happen.

  • Register AtRoute classes for Spring native automatically
    Commit · Pull request

  • Add the Authentication Context bean to the Vaadin Web Security
    Commit · Pull request · Issue

    • AuthenticationContext is a concrete class that gets access to the authenticated user and allows performing logout integrated with Spring Security - AuthenticationContext is an injectable managed bean - Developers can plug additional LogoutHandlers in VaadinWebSecurity.addLogoutHandlers() - VaadinWebSecurity configures a LogoutSuccessHandler with a redirect strategy that can handle also XHR UIDL requests (UidlRedirectStrategy)
  • Add refresh flag to navigation event
    Commit · Pull request · Issue

    Add the isRefreshEvent to BeforeEnterEvent and AfterNavigationEvent to be make it possible to distinguish if the event is for a refresh of a preserve on refresh view.

  • Added a shorthand to remove a component from its parent
    Commit · Pull request

    Reduces coupling between UI components.

  • Add upload limits for Apache Commons File Upload
    Commit · Pull request

    Adds the default limit of maximum file part count for upload (10000) and also gives an opportunity to override it and other two limits (upload maximum file size and maximum request size) by creating a custom StreamRequestHandler :

    public class CustomServiceInitListener implements VaadinServiceInitListener {
        @Override
        public void serviceInit(ServiceInitEvent event) {
            event.addRequestHandler(new CustomStreamRequestHandler());
        }
    
        private static final class CustomStreamRequestHandler
                extends StreamRequestHandler {
            // override getFileSizeMax() and/or getRequestSizeMax() if needed
            @Override
            protected long getFileCountMax() {
                // your limit:
                return 1000;
            }
        }
    }

    See https://vaadin.com/docs/latest/advanced/service-init-listener for more information on how to add a custom request handler.

  • Bundle should take into account index.ts (#15893)
    Commit · Pull request · Issue

    Require re-bundling for changes in frontend/index.ts file.

  • Search for missed entries in theme.json (#16076)
    Commit · Pull request

    Flow now analyses the json content and entries in theme.json, not only the string content. It searches for entries in project's theme.jsom whose aren't in the default/app dev bundle. If any entries are found, Flow does re-bundling.

  • Add app vs default dev-bundle statistics (#16103)
    Commit · Pull request

  • Add README to the dev bundle directory (#16078)
    Commit · Pull request · Issue

Fixes since Flow 24.0.0.rc3

Special thanks for contributions and testing @joshlong @aspan @lpdevit

Don't miss a new flow release

NewReleases is sending notifications on new releases.