1

我正在测试从“开始”页面(此处)生成的空 Vaadin 项目

我面临着非常缓慢的启动时间(最多 6 分钟)而且我并不真正了解发生了什么,我尝试设置 vaadin.servlet.productionMode=true 但它并没有解决问题。

有没有办法生成更详细的启动日志?您可以在下面找到当前日志。

2020-02-13 09:18:14.399  INFO 12084 --- [  restartedMain] it.my-project.Application     : Starting Application on XCR10248 with PID 12084 (C:\Dev\workspace-eclipse-2019\my-project\target\classes started by cr10248 in C:\Dev\workspace-eclipse-2019\my-project)
2020-02-13 09:18:14.399  INFO 12084 --- [  restartedMain] it.my-project.Application     : No active profile set, falling back to default profiles: default
2020-02-13 09:18:14.446  INFO 12084 --- [  restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2020-02-13 09:18:14.446  INFO 12084 --- [  restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
2020-02-13 09:18:15.868  INFO 12084 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
2020-02-13 09:18:15.872  INFO 12084 --- [  restartedMain] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2020-02-13 09:18:15.872  INFO 12084 --- [  restartedMain] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.27]
2020-02-13 09:18:16.326  INFO 12084 --- [  restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2020-02-13 09:18:16.326  INFO 12084 --- [  restartedMain] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 1880 ms
2020-02-13 09:18:19.373  INFO 12084 --- [  restartedMain] c.v.f.s.VaadinServletContextInitializer  : Search for subclasses and classes with annotations took 2 seconds
2020-02-13 09:18:19.381  INFO 12084 --- [  restartedMain] c.v.f.server.startup.DevModeInitializer  : Starting dev-mode updaters in C:\Dev\workspace-eclipse-2019\my-project folder.
2020-02-13 09:18:19.412  INFO 12084 --- [  restartedMain] dev-updater                              : Visited 94 classes. Took 31 ms.
2020-02-13 09:18:19.444  INFO 12084 --- [  restartedMain] dev-updater                              : Skipping `npm install`.
2020-02-13 09:18:19.444  INFO 12084 --- [  restartedMain] dev-updater                              : Copying frontend resources from jar files ...
2020-02-13 09:18:19.819  INFO 12084 --- [  restartedMain] dev-updater                              : Visited 12 resources. Took 372 ms.
2020-02-13 09:18:19.850  INFO 12084 --- [  restartedMain] dev-updater                              : No js modules to update 'C:\Dev\workspace-eclipse-2019\my-project\target\frontend\generated-flow-imports.js' file
2020-02-13 09:24:48.821  INFO 12084 --- [  restartedMain] dev-webpack                              : Starting webpack-dev-server, port: 63432 dir: C:\Dev\workspace-eclipse-2019\my-project
2020-02-13 09:24:48.951  INFO 12084 --- [  restartedMain] dev-webpack                              : Running webpack to compile frontend resources. This may take a moment, please stand by...
2020-02-13 09:25:18.986  INFO 12084 --- [  restartedMain] dev-webpack                              : Webpack startup and compilation completed in 30165ms
2020-02-13 09:25:19.211  INFO 12084 --- [  restartedMain] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 'applicationTaskExecutor'
2020-02-13 09:25:19.649  INFO 12084 --- [  restartedMain] o.s.b.d.a.OptionalLiveReloadServer       : LiveReload server is running on port 35729
2020-02-13 09:25:19.836  INFO 12084 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''
2020-02-13 09:25:19.836  INFO 12084 --- [  restartedMain] it.my-project.Application     : Started Application in 425.889 seconds (JVM running for 427.06)

谢谢大卫

4

1 回答 1

3

自从我找到(至少我希望:D)“解决方案”以来,我回答了我自己的问题。

就像几乎总是一样,Eclipse 无法理解项目生成的静态资源(在这种情况下为 JS 文件)发生了什么,并且由于某种原因,似乎每次都执行完整的构建,导致漫长的等待。

只需在项目根目录上执行 F5 就可以了,现在启动需要 5 秒。

希望这可以帮助其他开发人员。

于 2020-02-13T09:39:54.700 回答