Unlock instant, AI-driven research and patent intelligence for your innovation.

Dynamic data source switching method and device under SpringBoot framework, equipment and storage medium

A data source, multi-data source technology, applied in the field of data processing, can solve problems such as dynamic and adjustment that cannot be timely

Inactive Publication Date: 2019-09-06
武汉神算云信息科技有限责任公司
View PDF4 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] Although the above solution can realize the dynamic switching of multiple data sources under the existing configuration, but in the case of multiple data source changes (addition, deletion of tenants or adjustment of tenant data sources), it cannot be adjusted dynamically in a timely manner, and the project needs to be reinstalled. Package and publish

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Dynamic data source switching method and device under SpringBoot framework, equipment and storage medium
  • Dynamic data source switching method and device under SpringBoot framework, equipment and storage medium
  • Dynamic data source switching method and device under SpringBoot framework, equipment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0024] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention. In addition, the technical features in each embodiment or a single embodiment provided by the present invention can be combined arbitrarily with each other to form a feasible technical solution, but it must be based on the realization of those skilled in the art. When there is a contradiction or cannot be realized, it should be considered that ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The embodiment of the invention provides a data source dynamic switching method and device under a SpringBoot framework. The method comprises the following steps of: creating configuration center items with git as a configuration warehouse, setting a Git configuration file storage address in the configuration center project, setting parameters of the Git configuration file conducting multi-data-source boot key value setting on the multi-data-source configuration file, and pushing the set multi-data-source configuration file to the Git; using a service project as a configuration center client;setting a configuration center address and a configuration center parameter which need to be read in a boot configuration file, performing dynamic switching on the multi-data source configuration filein the business project, calling a refresh interface of the business project, and obtaining the configuration of the multi-data source configuration file; and extracting an instance of the Abstraction Data Source inheritance class, regenerating a multi-data source set according to the configuration of the multi-data source configuration file, and performing re-assignment on the multi-data sourceset. According to the invention, switching among multiple data sources can be realized.

Description

technical field [0001] The embodiments of the present invention relate to the technical field of data processing, and in particular to a method, device, device and storage medium for dynamically switching data sources under the framework of SpringBoot. Background technique [0002] The multi-tenant service system is a typical SAAS (Software-as-a-Service, software as a service) system, and the data source between each tenant is isolated according to the database, which ensures the independence, security and stability of each tenant's business data. Therefore, there are multiple data sources in the system, and at the same time, it is necessary to dynamically switch data sources according to the different tenants of the current user to access the data sources corresponding to the tenants to ensure the correctness of the data. The scheme of dynamic switching of multiple data sources in the SpringBoot system is generally: Inherit the AbstractRoutingDataSource class, which is an a...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/445G06F9/448H04L29/08
CPCG06F9/44505G06F9/4488H04L67/34
Inventor 向琪李伟袁游
Owner 武汉神算云信息科技有限责任公司