mvn spring-boot:run 与 java -jar xxx.jar 性能差异

huangapple 未分类评论44阅读模式
英文:

mvn spring-boot:run vs java -jar xxx.jar performance difference

问题

在我的项目中,我使用 Spring Boot 和 JSF。当我从IDE(eclipse)启动我的Web应用程序,或者使用 'mvn spring-boot:run' 命令时,没有任何问题,响应时间非常快。但是,当我使用 'mvn clean install' 命令打包我的应用程序,然后运行 'java -jar myapp.war',有时处理简单任务会花费很长时间。例如,打开一个包含一些来自后端bean的数据的对话框页面,通常需要200毫秒,但有时却需要7秒钟。这个问题的原因是什么?

注:我只在使用打包的fat .war文件运行时遇到这个问题。

英文:

In my project i use spring-boot with jsf. When i start my web application from IDE(eclipse) or using 'mvn spring-boot:run' command there is no problem response time is very good. But when i package my app with ' mvn clean install ' and than run 'java -jar myapp.war' sometimes it takes too long time to process simple jobs. For example opening a dialog page with some data from backing bean, normally takes 200 msec but sometimes it takes 7 secs. What can it be the cause of this problem ?

Not: I face this problem only running it with packaged fat .war file.

huangapple
  • 本文由 发表于 2020年7月23日 23:57:59
  • 转载请务必保留本文链接:https://java.coder-hub.com/63058374.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定