就是这只瓜呀 2021-10-22 10:06 采纳率: 0%
浏览 132

springboot+mybatis-puls 使用多数据源,项目启动非常慢是为什么?

img



```java

started by Administrator in E:\dingding\demo(1))
2021-10-22 09:57:12.051  INFO 12352 --- [           main] c.e.datasource.demo.DemoApplication      : No active profile set, falling back to default profiles: default
2021-10-22 09:57:18.693  WARN 12352 --- [           main] o.m.s.mapper.ClassPathMapperScanner      : Skipping MapperFactoryBean with name 'assetInterestBonusDao' and 'com.example.datasource.demo.dao.ext.AssetInterestBonusDao' mapperInterface. Bean already defined with the same name!
2021-10-22 09:57:18.693  WARN 12352 --- [           main] o.m.s.mapper.ClassPathMapperScanner      : Skipping MapperFactoryBean with name 'assetInterestDao' and 'com.example.datasource.demo.dao.ext.AssetInterestDao' mapperInterface. Bean already defined with the same name!
2021-10-22 09:57:18.693  WARN 12352 --- [           main] o.m.s.mapper.ClassPathMapperScanner      : Skipping MapperFactoryBean with name 'assetPhysicBookValueDetailMapper' and 'com.example.datasource.demo.dao.ext.AssetPhysicBookValueDetailMapper' mapperInterface. Bean already defined with the same name!
2021-10-22 09:57:18.693  WARN 12352 --- [           main] o.m.s.mapper.ClassPathMapperScanner      : Skipping MapperFactoryBean with name 'assetPhysicBookValueMapper' and 'com.example.datasource.demo.dao.ext.AssetPhysicBookValueMapper' mapperInterface. Bean already defined with the same name!
2021-10-22 09:57:18.693  WARN 12352 --- [           main] o.m.s.mapper.ClassPathMapperScanner      : Skipping MapperFactoryBean with name 'assetPhysicMapper' and 'com.example.datasource.demo.dao.ext.AssetPhysicMapper' mapperInterface. Bean already defined with the same name!
2021-10-22 09:57:18.693  WARN 12352 --- [           main] o.m.s.mapper.ClassPathMapperScanner      : Skipping MapperFactoryBean with name 'contractLeaseMapper' and 'com.example.datasource.demo.dao.ext.ContractLeaseMapper' mapperInterface. Bean already defined with the same name!
2021-10-22 09:57:18.694  WARN 12352 --- [           main] o.m.s.mapper.ClassPathMapperScanner      : Skipping MapperFactoryBean with name 'contractLeaseReceivableDetailMapper' and 'com.example.datasource.demo.dao.ext.ContractLeaseReceivableDetailMapper' mapperInterface. Bean already defined with the same name!
2021-10-22 09:57:18.694  WARN 12352 --- [           main] o.m.s.mapper.ClassPathMapperScanner      : Skipping MapperFactoryBean with name 'contractLeaseReceivableMapper' and 'com.example.datasource.demo.dao.ext.ContractLeaseReceivableMapper' mapperInterface. Bean already defined with the same name!
2021-10-22 09:57:18.694  WARN 12352 --- [           main] o.m.s.mapper.ClassPathMapperScanner      : Skipping MapperFactoryBean with name 'contractMapper' and 'com.example.datasource.demo.dao.ext.ContractMapper' mapperInterface. Bean already defined with the same name!
2021-10-22 09:57:21.011  INFO 12352 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8333 (http)
2021-10-22 09:57:21.029  INFO 12352 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2021-10-22 09:57:21.029  INFO 12352 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.53]
2021-10-22 09:57:21.228  INFO 12352 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2021-10-22 09:57:21.229  INFO 12352 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 8509 ms
2021-10-22 09:57:21.717  INFO 12352 --- [           main] com.zaxxer.hikari.HikariDataSource       : db1 - Starting...
2021-10-22 09:57:22.071  INFO 12352 --- [           main] com.zaxxer.hikari.HikariDataSource       : db1 - Start completed.
2021-10-22 09:57:22.071  INFO 12352 --- [           main] com.zaxxer.hikari.HikariDataSource       : db2 - Starting...
2021-10-22 09:57:22.081  INFO 12352 --- [           main] com.zaxxer.hikari.HikariDataSource       : db2 - Start completed.
2021-10-22 09:57:22.081  INFO 12352 --- [           main] c.b.d.d.DynamicRoutingDataSource         : dynamic-datasource - load a datasource named [db2] success
2021-10-22 09:57:22.082  INFO 12352 --- [           main] c.b.d.d.DynamicRoutingDataSource         : dynamic-datasource - load a datasource named [db1] success
**2021-10-22 09:57:22.082  INFO 12352 --- [           main] c.b.d.d.DynamicRoutingDataSource         : dynamic-datasource initial loaded [2] datasource,primary datasource named [db1]
 _ _   |_  _ _|_. ___ _ |    _ 
| | |\/|_)(_| | |_\  |_)||_|_\ 
     /               |         
                        3.2.0 
2021-10-22 10:01:01.157**

```

  • 写回答

3条回答 默认 最新

  • 普通网友 2021-10-22 10:23
    关注

    项目启动慢,,不要赖mybatis-plus,有可能就是你项目本身的问题;

    要先排查才知道的。

    评论

报告相同问题?

问题事件

  • 创建了问题 10月22日

悬赏问题

  • ¥15 任意一个散点图自己下载其js脚本文件并做成独立的案例页面,不要作在线的,要离线状态。
  • ¥30 c#打开word开启修订并实时显示批注
  • ¥15 如何解决ldsc的这条报错/index error
  • ¥15 VS2022+WDK驱动开发环境
  • ¥30 关于#java#的问题,请各位专家解答!
  • ¥30 vue+element根据数据循环生成多个table,如何实现最后一列 平均分合并
  • ¥20 pcf8563时钟芯片不启振
  • ¥20 pip2.40更新pip2.43时报错
  • ¥15 换yum源但仍然用不了httpd
  • ¥50 C# 使用DEVMOD设置打印机首选项