baomidou / dynamic-datasource

dynamic datasource for springboot 多数据源 动态数据源 主从分离 读写分离 分布式事务
https://www.kancloud.cn/tracy5546/dynamic-datasource/2264611
Apache License 2.0
4.67k stars 1.19k forks source link

Updating the SQLite table record restarted SpringBoot Application? #217

Closed przygrubyu5 closed 4 years ago

przygrubyu5 commented 4 years ago

Enviroment

JDK Version(required): 1.8 SpringBoot Version(required): 2.1.1 dynamic-datasource-spring-boot-starter Version(required): 3.1.0 druid Version(optional): 1.1.22

Describe

  1. first db is SqlServer and second db is SQLite
  2. Dynamic DB restarted SpringBoot Application when updated the SQLite table record at the service of SqlServer .
  3. SqlServer DB is primary,Sqllite Mapper added the DS annotation TIM截图20200529142438

Expected Result:

Actual Result:

Steps to reproduce

przygrubyu5 commented 4 years ago

image

3.3.2
huayanYu commented 4 years ago

根据我一般经验都是一些其他问题影响的,仔细检查下或者降低下dynamic-datasource-spring-boot-starter 版本试试。

huayanYu commented 4 years ago

无更多回复,关闭

przygrubyu5 commented 4 years ago

你好,我因为有事没有回复,请重新开启一下数据库,我测试过,使用sqlserver+h2,动态数据源不会重启,但是sqlserver+sqlite就会重启,这应该不是其他问题影响的

przygrubyu5 commented 4 years ago

我从spring官网创建了一个demo,什么都没有放,仅放了sqlserver/sqlite,hutool,然后放了几个必要类,然后就保存了一个sqlite表,一样会重启的,h2不会,我觉得是代码问题,需要看看

przygrubyu5 commented 4 years ago

好,我找到问题了,是我自己的问题