Bao Mi Dou-Multi-Data Source 3.3.0 Heavy Update: Local Multi-Data Source Transaction Solution

Dynamic-datasource is an extremely simple spring-boot-based multi-data source component, which can make your system support multiple data sources easily and quickly.

https://dynamic-datasource.com/Official  website

It also provides support for various third parties and has extremely high scalability.

But the aop-based program always has a problem that is difficult to solve, that is, the transaction problem.

The authors of this project often receive the following questions.

  1. Why did I add spring transaction annotations and fail to switch data sources?
  2. I understand that distributed transactions are involved, and I know that the project can easily integrate seata. But my scenario is simple, is there a solution that does not rely on third parties?

Since 3.3.0, seata's core contributor https://github.com/a364176773 has contributed a connection proxy-based solution.

There will definitely be some problems in the first version. It is recommended that you carefully test it locally before launching it into production. I hope you have more comments.

https://dynamic-datasource.com/guide/tx/Local.html  official website to view detailed documents.

v3.3.0

  • feat: Important: local multi-data source transaction support. @FUNKYE
  • feat: The storage method of the underlying data source is modified to ConcurrentHashMap. @刘尚
  • revert: Refactor the creation rules of the underlying Creator. @刘尚
  • feat: Add a data source with the same name to overwrite the old data source. @刘尚
  • feat: Support some scenarios where DS is inherited from the interface. @CQJames
  • fix: Fix a parameter setting error of Druid firewall. @mrf
  • fix: Fix the abnormal handling of setting data source in extreme cases. @happier233

characteristic

  1. Support  data source grouping  , suitable for multiple scenarios, pure multi-database read-write separation, one-master multi-slave mixed mode.
  2. Supports  ENC() encryption of database sensitive configuration information  .
  3. Support each database to initialize the table structure schema and database independently.
  4. Support  custom annotations  , need to inherit DS (3.2.0+).
  5. Provide quick integration of Druid, Mybatis-Plus, P6sy, Jndi.
  6. Simplify the configuration of Druid and HikariCp and provide  global parameter configuration  . Configure once, globally.
  7. Provide  custom data source source  program.
  8. Provide a program for dynamically adding and removing data sources after the project is started   .
  9. Provide a pure read-write separation  solution in the Mybatis environment  .
  10. Provide a  data source solution using  Spel dynamic parameters . Built-in spel, session, header, support customization.
  11. Support  multi-level data source nested switching  . (ServiceA >>> ServiceB >>> ServiceC).
  12. Provide solutions, precautions and examples for the integration of shiro, sharding-jdbc, quartz and other third-party libraries.
  13. Provide  a distributed transaction solution based on seata.  Attachment: Native spring transactions are not supported.
  14. Provide  local multi-data source transaction program.  Attachment: Native spring transactions are not supported.

Guess you like

Origin www.oschina.net/news/124390/dynamic-datasource-3-3-0-released