Skip to content

Commit

Permalink
fix: add help for slow scanning (#947)
Browse files Browse the repository at this point in the history
Add suggestion to use whitelist
if scanning is really slow.

Fixes #927
  • Loading branch information
caalador authored and vaadin-bot committed Nov 30, 2021
1 parent 4244acc commit 7b43681
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,13 @@ public void contextInitialized(ServletContextEvent event) {
"Search for subclasses and classes with annotations took {} seconds",
(classScanning - start) / 1000);

if (ms > 10000 && appContext.getEnvironment()
.getProperty("vaadin.whitelisted-packages") == null) {
getLogger().info(
"Due to slow search it is recommended to use the whitelisted-packages feature to make scanning faster.\n\n"
+ "See 'Flow / Integrations / Using Vaadin with Spring / Vaadin Spring Configuration' topic 'Special configuration parameters' at https://vaadin.com/docs for more detailed information.");
}

try {
DevModeInitializer.initDevModeHandler(classes,
event.getServletContext(), config);
Expand Down

0 comments on commit 7b43681

Please sign in to comment.