Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[错误报告]: 描述集成mybatis-plus3.5.7以后,项目启动非常缓慢 #6516

Open
3 tasks done
H-Knight opened this issue Sep 25, 2024 · 2 comments
Open
3 tasks done

Comments

@H-Knight
Copy link

确认

  • 我使用的版本是最新版, 并且使用插件确认过项目里无依赖版本冲突
  • 我已经在 issue 中搜索过, 确认问题没有被提出过
  • 我已经修改标题, 将标题中的 描述 替换为遇到的问题

当前程序版本

3.5.7

问题描述

我项目原先用的tkmybatis,然后在改成mybatis-plus后发现项目启动非常慢,依赖引入了mybatis-plus 3.5.7和mybatis-plus-join-boot-starter 1.4.13。通过BeanPostProcessor打印项目启动时的bean加载时间,发现所有mapper加载了两次,且第二次加载的时间非常缓慢,大概在一两千毫秒。

详细堆栈日志

2024-09-25 19:04:40.048  INFO 15620 --- [           main] c.d.c.BeanInitCostTimeBeanPostProcessor  : beanName roomApRelMapper, init cost 2ms
2024-09-25 19:04:41.286  INFO 15620 --- [           main] c.d.c.BeanInitCostTimeBeanPostProcessor  : beanName roomApRelMapper, init cost 1240ms
2024-09-25 19:04:41.777  INFO 15620 --- [           main] c.d.c.BeanInitCostTimeBeanPostProcessor  : beanName roomApRelServiceImpl, init cost 487ms
2024-09-25 19:04:41.783  INFO 15620 --- [           main] c.d.c.BeanInitCostTimeBeanPostProcessor  : beanName roomTcpRelMapper, init cost 1ms
2024-09-25 19:04:43.315  INFO 15620 --- [           main] c.d.c.BeanInitCostTimeBeanPostProcessor  : beanName roomTcpRelMapper, init cost 1533ms
2024-09-25 19:04:43.320  INFO 15620 --- [           main] c.d.c.BeanInitCostTimeBeanPostProcessor  : beanName tcpConfigMapper, init cost 1ms
2024-09-25 19:04:45.010  INFO 15620 --- [           main] c.d.c.BeanInitCostTimeBeanPostProcessor  : beanName tcpConfigMapper, init cost 1691ms
2024-09-25 19:04:45.026  INFO 15620 --- [           main] c.d.c.BeanInitCostTimeBeanPostProcessor  : beanName roomNodeRelMapper, init cost 1ms
2024-09-25 19:04:46.883  INFO 15620 --- [           main] c.d.c.BeanInitCostTimeBeanPostProcessor  : beanName roomNodeRelMapper, init cost 1858ms
2024-09-25 19:04:46.887  INFO 15620 --- [           main] c.d.c.BeanInitCostTimeBeanPostProcessor  : beanName nodeMapper, init cost 1ms
2024-09-25 19:04:49.114  INFO 15620 --- [           main] c.d.c.BeanInitCostTimeBeanPostProcessor  : beanName nodeMapper, init cost 2228ms
2024-09-25 19:04:49.120  INFO 15620 --- [           main] c.d.c.BeanInitCostTimeBeanPostProcessor  : beanName roomNodeLayoutMapper, init cost 0ms
2024-09-25 19:04:51.658  INFO 15620 --- [           main] c.d.c.BeanInitCostTimeBeanPostProcessor  : beanName roomNodeLayoutMapper, init cost 2538ms
@fengyujun
Copy link

是不是应该把mybatis-plus-join-boot-starter包去掉启动看看有没有问题,再确定是否是mp问题

@qmdx
Copy link
Member

qmdx commented Oct 15, 2024

up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants