Skip to content

Commit

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

Fixes #927

Co-authored-by: caalador <mikael.grankvist@vaadin.com>
  • Loading branch information
vaadin-bot and caalador authored Dec 1, 2021
1 parent 736a33d commit 5f5e7c7
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 (classScanning > 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 5f5e7c7

Please sign in to comment.