idea启动springboot项目突然特别慢

在使用idea操作中,启动项目时突然项目启动很慢,查看启动日志没有报错,只是停留在一个地方,停滞不前,放置不管之后一个多小时启动成功,停留如图:

Connected to the target VM, address: '127.0.0.1:64350', transport: 'socket'

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.2.5.RELEASE)

2020-12-21 15:07:16,523 INFO [main]com.fridge.MythicalAnimalsApplication.logStarting:55 -Starting MythicalAnimalsApplication on 69a027220006809.corp.haier.com with PID 85352 (/Users/admin/project/uhome/Doc_01_Uhome/mythicalanimals/target/classes started by admin in /Users/admin/project/uhome/Doc_01_Uhome/mythicalanimals)
2020-12-21 15:07:16,533 INFO [main]com.fridge.MythicalAnimalsApplication.logStartupProfileInfo:655 -The following profiles are active: dev
2020-12-21 15:07:18,509 INFO [main]o.s.d.repository.config.RepositoryConfigurationDelegate.multipleStoresDetected:249 -Multiple Spring Data modules found, entering strict repository configuration mode!
2020-12-21 15:07:18,510 INFO [main]o.s.d.repository.config.RepositoryConfigurationDelegate.registerRepositoriesIn:127 -Bootstrapping Spring Data MongoDB repositories in DEFAULT mode.
2020-12-21 15:07:18,621 INFO [main]o.s.d.repository.config.RepositoryConfigurationDelegate.registerRepositoriesIn:187 -Finished Spring Data repository scanning in 102ms. Found 0 MongoDB repository interfaces.
2020-12-21 15:07:18,634 INFO [main]o.s.d.repository.config.RepositoryConfigurationDelegate.multipleStoresDetected:249 -Multiple Spring Data modules found, entering strict repository configuration mode!
2020-12-21 15:07:18,635 INFO [main]o.s.d.repository.config.RepositoryConfigurationDelegate.registerRepositoriesIn:127 -Bootstrapping Spring Data Redis repositories in DEFAULT mode.
2020-12-21 15:07:18,696 INFO [main]o.s.d.repository.config.RepositoryConfigurationDelegate.registerRepositoriesIn:187 -Finished Spring Data repository scanning in 53ms. Found 0 Redis repository interfaces.
2020-12-21 15:07:20,601 INFO [main]o.s.boot.web.embedded.tomcat.TomcatWebServer.initialize:92 -Tomcat initialized with port(s): 7788 (http)
2020-12-21 15:07:20,613 INFO [main]org.apache.coyote.http11.Http11NioProtocol.log:173 -Initializing ProtocolHandler ["http-nio-7788"]
2020-12-21 15:07:20,614 INFO [main]org.apache.catalina.core.StandardService.log:173 -Starting service [Tomcat]
2020-12-21 15:07:20,614 INFO [main]org.apache.catalina.core.StandardEngine.log:173 -Starting Servlet engine: [Apache Tomcat/9.0.31]
2020-12-21 15:07:20,760 INFO [main]o.a.c.c.C.[Tomcat].[localhost].[/mythicalanimals].log:173 -Initializing Spring embedded WebApplicationContext
2020-12-21 15:07:20,760 INFO [main]org.springframework.web.context.ContextLoader.prepareWebApplicationContext:284 -Root WebApplicationContext: initialization completed in 180172 ms

测试了一圈找到了解决方法:原来是自己在debug时不小心在方法上打了断点没有取消,于是就去查看断点并且取消,方案如图,取消框中方法的断点就可以正常启动了

总结:idea中断点不能打在方法上,只能打在方法里的某一行,打在方法上就会导致idea启动项目特别慢

# idea  

评论

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×