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

A data source access method and device based on spring Boot in different environments

A data source and database technology, applied in the field of database access, can solve problems such as increased development volume, inflexible implementation, and more information for staff configuration, and achieve the effects of reducing workload, improving flexibility, and improving work efficiency

Active Publication Date: 2021-02-12
ZHONGKE DINGFU BEIJING TECH DEV
View PDF2 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] This application provides a data source access method and device based on Spring Boot in different environments to solve the problem that only one data source is configured for the existing ORM and JDBC. Different data sources are configured by hard coding, resulting in a lot of information configured by the staff, which not only increases the amount of development, but also takes a lot of time and effort, and the implementation is not flexible

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
  • A data source access method and device based on spring Boot in different environments
  • A data source access method and device based on spring Boot in different environments
  • A data source access method and device based on spring Boot in different environments

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0033] Since the content of the invention of this application involves the execution of framework programs, SpringBoot in the embodiment is firstly introduced. Spring Boot is a brand-new framework provided by the Pivota team. The framework uses a specific method (that is, starter, convention takes precedence over configuration) to configure, so that developers no longer need to define boilerplate configuration. Spring Boot simplifies Spring project configuration, making jar dependency management and application compilation and deployment easier. Spring Boot provides automatic configuration, and workers only need to write the necessary code and configure the necessary properties.

[0034] see figure 1 , an embodiment of the present application provides a data source access method based on Spring Boot in different environments, including the following steps:

[0035] Step 11: Load the configuration file, the configuration file includes the type of the configuration file, the e...

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

This application provides a data source access method and device based on Spring Boot in different environments. According to the type of configuration file and environment variables, load and start the corresponding data access object configuration component, and then use the base class of the service layer and the implementation class to obtain the required data source, and then access the database connected to the data source. Therefore, the staff only need to modify the type and environment variables of the configuration file, and pre-store the data access object configuration components, without requiring the staff to reconfigure the new data source through hard coding, which greatly reduces the workload of the staff and improves the work efficiency. Efficiency, and improve the flexibility of data source access.

Description

technical field [0001] The present application relates to the field of database access, in particular to a data source access method and device based on Spring Boot in different environments. Background technique [0002] A database is a warehouse that organizes, stores and manages data according to its data structure. There are various types of databases, such as simple databases that store various data tables or large database systems that store massive amounts of data. When object-oriented, because the database needs different data sources to access it in different environments (such as development environment or test environment), therefore, the staff need to switch the data source when switching the database environment. [0003] At present, the existing technologies mostly use ORM (Object / Relation Mapping, object-relational mapping) or JDBC (Java Data Base Connectivity, Java database connection) to access the database, but no matter ORM or JDBC, only one data source i...

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 Patents(China)
IPC IPC(8): G06F16/25G06F9/46
CPCG06F9/466
Inventor 郑志刚
Owner ZHONGKE DINGFU BEIJING TECH DEV