Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: set load-on-startup for automatically registered Vaadin servlets #84

Merged
merged 2 commits into from
Sep 14, 2022

Conversation

mcollovati
Copy link
Contributor

Description

When using Vite, DevModeInitializer blocks dev-server startup until a VaadinServlet is deployed because it needs to get the servlet path to use. If the container lazily loads servlets, Vite will not start until the first HTTP request for the Vaadin servlet is received.
This change sets load-on-startup feature for all Vaadin Servlet registered by the extension, to ensure that Vite is loaded at the startup of the Web application.
A warning message is shown for custom Vaadin servlets that do not set loadOnStartup on WebServlet annotation.

Part of vaadin/flow#14479

Type of change

  • Bugfix
  • Feature

Checklist

  • I have read the contribution guide: https://vaadin.com/docs/latest/guide/contributing/overview/
  • I have added a description following the guideline.
  • The issue is created in the corresponding repository and I have referenced it.
  • I have added tests to ensure my change is effective and works as intended.
  • New and existing tests are passing locally with my change.
  • I have performed self-review and corrected misspellings.

Additional for Feature type of change

  • Enhancement / new feature was discussed in a corresponding GitHub issue and Acceptance Criteria were created.

When using Vite, DevModeInitializer blocks dev-server startup until a
VaadinServlet is deployed because it needs to get the servlet path to use.
If the container lazily loads servlets, Vite will not start until the first
HTTP request for the Vaadin servlet is received.
This change sets load-on-startup feature for all Vaadin Servlet registered
by the extension, to ensure that Vite is loaded at the startup of the
Web application.
A warning message is shown for custom Vaadin servlets that do not set
loadOnStartup on WebServlet annotation.

Part of vaadin/flow#14479
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@mshabarov mshabarov merged commit 500c8e9 into master Sep 14, 2022
@mshabarov mshabarov deleted the issues/14479_servlet_load_on_startup branch September 14, 2022 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants