Micro-server caching method and device based on multiple data sources and storage medium
The invention discloses a micro-server caching method based on multiple data sources, and the method comprises the steps: carrying out the overall splitting of a to-be-shared cache server according to a preset splitting standard, and carrying out the grouping, and enabling the preset splitting stand...
Gespeichert in:
Hauptverfasser: | , , |
---|---|
Format: | Patent |
Sprache: | chi ; eng |
Schlagworte: | |
Online-Zugang: | Volltext bestellen |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | The invention discloses a micro-server caching method based on multiple data sources, and the method comprises the steps: carrying out the overall splitting of a to-be-shared cache server according to a preset splitting standard, and carrying out the grouping, and enabling the preset splitting standard to be consistent with the splitting standard of a database; the method comprises the following steps: setting different injection configuration classes based on an injection mechanism of Spring Bean; obtaining the injection configuration class through a Spring injection mechanism, and appointing a name of a call link in service call; and specifying the Bean corresponding to the name. According to the invention, when the corresponding business is used, one single micro-service is connected with and uses a plurality of cache platforms, the size is reduced, and the cost is saved.
本发明公开了一种基于多数据源的微服务器缓存方法,所述方法包括:将需要共享的缓存服务器按照预设拆分标准进行整体拆分,并进行分组,所述预设的拆分标准与数据库的拆分标准一致;基于Spring Bean的注入机制,设置不同的注入配置类;通过Spring注入机制获取所述注入配置类, |
---|