CN113704225B - Method, system, device and storage medium for constructing and using configuration center - Google Patents
Method, system, device and storage medium for constructing and using configuration center Download PDFInfo
- Publication number
- CN113704225B CN113704225B CN202110963639.XA CN202110963639A CN113704225B CN 113704225 B CN113704225 B CN 113704225B CN 202110963639 A CN202110963639 A CN 202110963639A CN 113704225 B CN113704225 B CN 113704225B
- Authority
- CN
- China
- Prior art keywords
- data
- setting
- data table
- layer
- interface
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 39
- 230000004044 response Effects 0.000 claims description 9
- 238000004590 computer program Methods 0.000 claims description 7
- 238000011161 development Methods 0.000 abstract description 8
- 238000013500 data storage Methods 0.000 abstract description 5
- 238000010586 diagram Methods 0.000 description 6
- 230000008901 benefit Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 230000014509 gene expression Effects 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000002688 persistence Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 235000006719 Cassia obtusifolia Nutrition 0.000 description 1
- 235000014552 Cassia tora Nutrition 0.000 description 1
- 244000201986 Cassia tora Species 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000002085 persistent effect Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/21—Design, administration or maintenance of databases
- G06F16/211—Schema design and management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2291—User-Defined Types; Storage management thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/25—Integrating or interfacing systems involving database management systems
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention provides a method, a system, a device and a storage medium for constructing and using a configuration center under an SSM framework, wherein the method comprises the following steps: dividing a configuration center into an interface layer, an implementation layer and a data access object layer; setting a query interface and a setting interface at the interface layer, and setting realization logic of the query interface and the setting interface at the realization layer; converting configuration data of multiple dimensions into data of preset dimensions at the data access object layer and storing the data into a data table; and executing the data table according to the query request or the setting request to acquire the data of the corresponding dimension or writing the data into the data table. According to the invention, the configuration data of multiple dimensions are converted into the data storage of three dimensions, so that the occupied space of the hard disk of the database is greatly saved, and the development efficiency is improved.
Description
Technical Field
The present invention relates to the field of configuration centers, and more particularly, to a method, system, device, and storage medium for building and using a configuration center under an SSM framework.
Background
SSM frames are currently widely used in information management systems to solve the problems of high code coupling, difficulty in extension and maintenance. The SSM framework is integrated from Spring, springMVC and Mybatis.
Spring is an open source framework created to address the complexity of enterprise application development. Spring uses a basic JAVA bean to do what could previously only be done by EJBs (commercial application component technology Enterprise Java Bean in JAVA). However, the use of Spring is not limited to the development of the server side. Any Java application can benefit from Spring from the point of view of simplicity, testability and loose coupling. Spring is a lightweight control Inversion (IOC) and tangential plane (AOP) oriented container framework that can greatly reduce code coupling.
Spring MVC separates the roles of the controller, model object, dispatcher, and handler objects, which makes them easier to customize.
MyBatis is a Java-based persistence layer framework. MyBatis maps interfaces and generic Java objects to records in a database. Allowing the developer to use SQL to master and tune. MyBatis is a Java-based persistence layer framework. The persistent layer framework provided by iBATIS includes SQL Maps and Data Access Objects (DAO). MyBatis eliminates the manual setting of almost all JDBC (Java DataBase Connectivity ) codes and parameters and retrieval of result sets. MyBatis maps interfaces and Java POJOs (plain old Java objects) to records in a database using simple XML (Extensive Markup Language, extensible markup language) or notes for configuration and original mapping.
The storage management software is a set of web (network) applications implemented based on SSM framework, and there is a troublesome problem that there are a lot of setting items in the management software, such as alarm threshold setting item, mail notification setting item, browser notification setting item, SNMP (Simple Network Management Protocol ) setting item, LDAP (Lightweight Directory Access Protocol, lightweight directory access protocol) configuration item, backup setting, SMTP (Simple Mail Transfer Protocol ) setting, etc. The content of these settings is typically an object, not a list. If each configuration is stored directly into the database, a separate data table needs to be created, and a separate DAO (Data Access Objects, data access object) layer and Service layer interface needs to be implemented. On the one hand, the space occupied by the data table is increased, and on the other hand, the method has poor development efficiency.
Disclosure of Invention
In view of this, an object of the embodiments of the present invention is to provide a method, a system, a computer device and a computer readable storage medium for constructing and using a configuration center under an SSM framework.
Based on the above objects, an aspect of the embodiments of the present invention provides a method for constructing and using a configuration center under an SSM framework, including the steps of: dividing a configuration center into an interface layer, an implementation layer and a data access object layer; setting a query interface and a setting interface at the interface layer, and setting realization logic of the query interface and the setting interface at the realization layer; converting configuration data of multiple dimensions into data of preset dimensions at the data access object layer and storing the data into a data table; and executing the data table according to the query request or the setting request to acquire the data of the corresponding dimension or writing the data into the data table.
In some embodiments, the executing the data table to obtain data of the corresponding dimension or writing data to the data table according to the query request or the setting request includes: responding to a received query request, and judging whether a section and/or key value in the query request is legal or not; and responding to the legal section and/or key value in the query request, and acquiring a value corresponding to the section and/or key value through the data access object layer.
In some embodiments, the executing the data table to obtain data of the corresponding dimension or writing data to the data table according to the query request or the setting request includes: and acquiring data of corresponding dimensions in the data table according to the section, key and value values.
In some embodiments, the executing the data table to obtain data of the corresponding dimension or writing data to the data table according to the query request or the setting request includes: and in response to receiving a setting request, determining values corresponding to the section and the key according to the setting request, and writing the section, the key and the corresponding values into the data table.
In another aspect of an embodiment of the present invention, there is provided a system for constructing and using a configuration center under an SSM framework, including: the division module is configured to divide the configuration center into an interface layer, an implementation layer and a data access object layer; the first setting module is configured to set a query interface and a setting interface at the interface layer, and set implementation logic of the query interface and the setting interface at the implementation layer; the second setting module is configured to convert configuration data of multiple dimensions into data of preset dimensions at the data access object layer and store the data into a data table; and the execution module is configured to execute the data table according to the query request or the setting request so as to acquire the data of the corresponding dimension or write the data into the data table.
In some embodiments, the execution module is configured to: responding to a received query request, and judging whether a section and/or key value in the query request is legal or not; and responding to the legal section and/or key value in the query request, and acquiring a value corresponding to the section and/or key value through the data access object layer.
In some embodiments, the execution module is configured to: and acquiring data of corresponding dimensions in the data table according to the section, key and value values.
In some embodiments, the execution module is configured to: and in response to receiving a setting request, determining values corresponding to the section and the key according to the setting request, and writing the section, the key and the corresponding values into the data table.
In yet another aspect of the embodiment of the present invention, there is also provided a computer apparatus, including: at least one processor; and a memory storing computer instructions executable on the processor, which when executed by the processor, perform the steps of the method as above.
In yet another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium storing a computer program which, when executed by a processor, implements the method steps as described above.
The invention has the following beneficial technical effects: the configuration center is divided into an interface layer, an implementation layer and a DAO layer, the interface layer provides query interfaces of the configuration center, the implementation layer is responsible for realizing the query interfaces, the DAO layer executes a data table of the data layer containing three key fields such as section, key, value and the like through MyBatis, configuration data of multiple dimensions are converted into data storage of three dimensions, the occupied space of a hard disk of a database is greatly saved, and development efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are necessary for the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention and that other embodiments may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of an embodiment of a method of constructing and using a configuration center under an SSM framework provided by the present invention;
FIG. 2 is a schematic diagram of an embodiment of a system for building and using a configuration center under the SSM framework provided by the present invention;
FIG. 3 is a schematic diagram of the hardware architecture of an embodiment of a computer device built under the SSM framework and using a configuration center provided by the present invention;
FIG. 4 is a schematic diagram of an embodiment of a computer storage medium constructed and used with a configuration center under the SSM framework provided by the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention will be described in further detail with reference to the accompanying drawings.
It should be noted that, in the embodiments of the present invention, all the expressions "first" and "second" are used to distinguish two entities with the same name but different entities or different parameters, and it is noted that the "first" and "second" are only used for convenience of expression, and should not be construed as limiting the embodiments of the present invention, and the following embodiments are not described one by one.
In a first aspect of the embodiments of the present invention, an embodiment of a method of building and using a configuration center under an SSM framework is presented. FIG. 1 is a schematic diagram illustrating an embodiment of a method of constructing and using a configuration center under an SSM framework provided by the present invention. As shown in fig. 1, the embodiment of the present invention includes the following steps:
s1, dividing a configuration center into an interface layer, an implementation layer and a data access object layer;
s2, setting a query interface and a setting interface at the interface layer, and setting realization logic of the query interface and the setting interface at the realization layer;
s3, converting configuration data of multiple dimensions into data of preset dimensions at the data access object layer, and storing the data into a data table; and
and S4, executing the data table according to the query request or the setting request to acquire the data of the corresponding dimension or writing the data into the data table.
Aiming at the problem that configuration data is not easy to localize under an SSM framework, the embodiment of the invention divides the configuration center into an interface layer, an implementation layer and a DAO layer, wherein the interface layer provides query interfaces of the configuration center, the implementation layer is responsible for realizing the query interfaces, the DAO layer executes a data table of a data layer containing three key fields such as section, key, value and the like through MyBatis, the configuration data of multiple dimensions is converted into data of three dimensions for storage, the hard disk occupation space of a database is greatly saved, and the development efficiency is improved.
The configuration center is divided into an interface layer, an implementation layer and a data access object layer. The interface layer provides a query interface of the configuration center, and the query interface at least comprises the following interfaces:
(1)Public String getSectionKeyString(String sectionName,String keyName);
(2)Public Integer getSectionKeyInteger(String sectionName,String keyName);
(3)Public Map<String,String>getSectionMap(String sectionName);
(4)Public Map<String,Object>getSectionAutoMap(String sectionName);
(5)Public Boolean setSectionKeyString(String sectionName,String keyName,String value);
(6)Public Boolean setSerctionKeyInteger(String sectionName,String keyName,Integer value);
(7)Public Boolean setSectionMap(String sectionName,Map<String,Object>sectionMap)。
(1) And (2) both represent query value according to section and key, but (1) represent the value as a string and (2) represent the value as an integer.
(3) And (4) all represent the configuration of querying a certain section, but the difference between (4) and (3) is that the value of the configuration item is subjected to automatic type conversion.
(5) And (6) each represent a value at which the section and the key are set, but (5) represents that the value is a character string, and (6) represents that the value is an integer.
(7) A configuration item indicating setting section.
The implementation layer implements the logic of the interface and filters illegal section and key values.
The data access object layer executes a data table of the data layer containing three key fields of section, key and value through MyBatis, and converts configuration data of multiple dimensions into data storage of three dimensions. For example, the configuration of mail notifications includes a switch state, sender, smtp server IP, port, encryption type, authentication account, password, recipient, and alert notification type, etc. In the prior art, a data table needs to be created, and the structure of the data table main_notify_table is as follows:
field name | Field type | Description of the invention |
Switch_on | int | Switch state |
Sender | varchar | Sender |
Smtp_server | varchar | smtp Server IP |
Smtp_port | int | Port (port) |
Encrypt_type | varchar | Encryption type |
Smtp_user | varchar | Authenticating an account |
Smtp_passwd | varchar | Password code |
recipient | varchar | Addressee |
alarm_type | int | Alarm notification type |
In the embodiment of the invention, the field names switch_ on, sender, smtp _server, smtp_port, encrypt_type, smtp_user, smtp_ passwd, recipient and alarm_type are stored as sections, the field types int and varchar are stored as keys, the Switch state, sender, smtp server IP, port, encryption type, authentication account, password, addressee and alarm notification type are stored as values, and the unique section name (such as EMAIL_NOTIFY) and keyName are used for using the names of various configurations.
And setting a query interface and a setting interface at the interface layer, setting realization logic of the query interface and the setting interface at the realization layer, converting configuration data of multiple dimensions into data of preset dimensions at the data access object layer, and storing the data into a data table.
And executing the data table according to the query request or the setting request to acquire the data of the corresponding dimension or writing the data into the data table.
In some embodiments, the executing the data table to obtain data of the corresponding dimension or writing data to the data table according to the query request or the setting request includes: responding to a received query request, and judging whether a section and/or key value in the query request is legal or not; and responding to the legal section and/or key value in the query request, and acquiring a value corresponding to the section and/or key value through the data access object layer. Legal section and key values may be written into the data table, and whether the section and key values are legal may be determined by judging whether the section and key values in the query request are in the data table when the query request is received.
In some embodiments, the executing the data table to obtain data of the corresponding dimension or writing data to the data table according to the query request or the setting request includes: and acquiring data of corresponding dimensions in the data table according to the section, key and value values.
In some embodiments, the executing the data table to obtain data of the corresponding dimension or writing data to the data table according to the query request or the setting request includes: and in response to receiving a setting request, determining values corresponding to the section and the key according to the setting request, and writing the section, the key and the corresponding values into the data table.
The queries such as getSectionKeyString are:
Select value from common_setting where section_name=#{sectionName}And key_name=#{keyName}
the corresponding value is queried by using the unique setionname and keyName.
According to the embodiment of the invention, the configuration center is divided into the interface layer, the implementation layer and the DAO layer, the interface layer provides the query interface of the configuration center, the implementation layer is responsible for realizing the query interfaces, the DAO layer executes the data table of the data layer containing three key fields such as section, key, value and the like through MyBatis, the configuration data of multiple dimensions are converted into the data storage of three dimensions, the hard disk occupation space of the database is greatly saved, and the development efficiency is improved.
It should be noted that, in the embodiments of the method for constructing and using a configuration center under the SSM framework, the steps may be intersected, replaced, added and deleted, so that the method for constructing and using a configuration center under the SSM framework by using these reasonable permutation and combination changes should also belong to the protection scope of the present invention, and should not limit the protection scope of the present invention to the embodiments.
In view of the above, a second aspect of the embodiments of the present invention proposes a system for constructing and using a configuration center under an SSM framework. As shown in fig. 2, the system 200 includes the following modules: the division module is configured to divide the configuration center into an interface layer, an implementation layer and a data access object layer; the first setting module is configured to set a query interface and a setting interface at the interface layer, and set implementation logic of the query interface and the setting interface at the implementation layer; the second setting module is configured to convert configuration data of multiple dimensions into data of preset dimensions at the data access object layer and store the data into a data table; and the execution module is configured to execute the data table according to the query request or the setting request so as to acquire the data of the corresponding dimension or write the data into the data table.
In some embodiments, the execution module is configured to: responding to a received query request, and judging whether a section and/or key value in the query request is legal or not; and responding to the legal section and/or key value in the query request, and acquiring a value corresponding to the section and/or key value through the data access object layer.
In some embodiments, the execution module is configured to: and acquiring data of corresponding dimensions in the data table according to the section, key and value values.
In some embodiments, the execution module is configured to: and in response to receiving a setting request, determining values corresponding to the section and the key according to the setting request, and writing the section, the key and the corresponding values into the data table.
In view of the above object, a third aspect of the embodiments of the present invention provides a computer device, including: at least one processor; and a memory storing computer instructions executable on the processor, the instructions being executable by the processor to perform the steps of: s1, dividing a configuration center into an interface layer, an implementation layer and a data access object layer; s2, setting a query interface and a setting interface at the interface layer, and setting realization logic of the query interface and the setting interface at the realization layer; s3, converting configuration data of multiple dimensions into data of preset dimensions at the data access object layer, and storing the data into a data table; and S4, executing the data table according to the query request or the setting request to acquire the data of the corresponding dimension or writing the data into the data table.
In some embodiments, the executing the data table to obtain data of the corresponding dimension or writing data to the data table according to the query request or the setting request includes: responding to a received query request, and judging whether a section and/or key value in the query request is legal or not; and responding to the legal section and/or key value in the query request, and acquiring a value corresponding to the section and/or key value through the data access object layer.
In some embodiments, the executing the data table to obtain data of the corresponding dimension or writing data to the data table according to the query request or the setting request includes: and acquiring data of corresponding dimensions in the data table according to the section, key and value values.
In some embodiments, the executing the data table to obtain data of the corresponding dimension or writing data to the data table according to the query request or the setting request includes: and in response to receiving a setting request, determining values corresponding to the section and the key according to the setting request, and writing the section, the key and the corresponding values into the data table.
According to the embodiment of the invention, the configuration center is divided into the interface layer, the implementation layer and the DAO layer, the interface layer provides the query interface of the configuration center, the implementation layer is responsible for realizing the query interfaces, the DAO layer executes the data table of the data layer containing three key fields such as section, key, value and the like through MyBatis, the configuration data of multiple dimensions are converted into the data storage of three dimensions, the hard disk occupation space of the database is greatly saved, and the development efficiency is improved.
As shown in fig. 3, a schematic hardware structure of an embodiment of a computer device constructed and used in the SSM framework provided in the present invention.
Taking the example of the device shown in fig. 3, a processor 301 and a memory 302 are included in the device.
The processor 301 and the memory 302 may be connected by a bus or otherwise, for example in fig. 3.
The memory 302 is used as a non-volatile computer readable storage medium for storing non-volatile software programs, non-volatile computer executable programs, and modules, such as program instructions/modules corresponding to the method of constructing and using the configuration center under the SSM framework in the embodiments of the present application. Processor 301 executes various functional applications of the server and data processing, i.e., a method of constructing and using a configuration center under the SSM framework implementing the above-described method embodiments, by running non-volatile software programs, instructions, and modules stored in memory 302.
The method for constructing and using the configuration center under the SSM framework comprises the following steps: dividing a configuration center into an interface layer, an implementation layer and a data access object layer; setting a query interface and a setting interface at the interface layer, and setting realization logic of the query interface and the setting interface at the realization layer; converting configuration data of multiple dimensions into data of preset dimensions at the data access object layer and storing the data into a data table; and executing the data table according to the query request or the setting request to acquire the data of the corresponding dimension or writing the data into the data table.
In some embodiments, the executing the data table to obtain data of the corresponding dimension or writing data to the data table according to the query request or the setting request includes: responding to a received query request, and judging whether a section and/or key value in the query request is legal or not; and responding to the legal section and/or key value in the query request, and acquiring a value corresponding to the section and/or key value through the data access object layer.
In some embodiments, the executing the data table to obtain data of the corresponding dimension or writing data to the data table according to the query request or the setting request includes: and acquiring data of corresponding dimensions in the data table according to the section, key and value values.
In some embodiments, the executing the data table to obtain data of the corresponding dimension or writing data to the data table according to the query request or the setting request includes: and in response to receiving a setting request, determining values corresponding to the section and the key according to the setting request, and writing the section, the key and the corresponding values into the data table.
Memory 302 may include a storage program area that may store an operating system, at least one application program required for functionality, and a storage data area; the storage data area may store data created according to the use of a method of constructing and using a configuration center under the SSM framework, and the like. In addition, memory 302 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, memory 302 may optionally include memory located remotely from processor 301, which may be connected to the local module via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Computer instructions 303 corresponding to the method of building and using a configuration center under one or more SSM frameworks are stored in memory 302, which when executed by processor 301, perform the method of building and using a configuration center under a SSM framework in any of the method embodiments described above.
Any one embodiment of a computer device that performs the method of constructing and using a configuration center under the SSM framework described above may achieve the same or similar effects as any of the method embodiments described above that correspond thereto.
The present invention also provides a computer readable storage medium storing a computer program which when executed by a processor performs a method of constructing and using a configuration center under the SSM framework as above.
The method for constructing and using the configuration center under the SSM framework comprises the following steps: dividing a configuration center into an interface layer, an implementation layer and a data access object layer; setting a query interface and a setting interface at the interface layer, and setting realization logic of the query interface and the setting interface at the realization layer; converting configuration data of multiple dimensions into data of preset dimensions at the data access object layer and storing the data into a data table; and executing the data table according to the query request or the setting request to acquire the data of the corresponding dimension or writing the data into the data table.
In some embodiments, the executing the data table to obtain data of the corresponding dimension or writing data to the data table according to the query request or the setting request includes: responding to a received query request, and judging whether a section and/or key value in the query request is legal or not; and responding to the legal section and/or key value in the query request, and acquiring a value corresponding to the section and/or key value through the data access object layer.
In some embodiments, the executing the data table to obtain data of the corresponding dimension or writing data to the data table according to the query request or the setting request includes: and acquiring data of corresponding dimensions in the data table according to the section, key and value values.
In some embodiments, the executing the data table to obtain data of the corresponding dimension or writing data to the data table according to the query request or the setting request includes: and in response to receiving a setting request, determining values corresponding to the section and the key according to the setting request, and writing the section, the key and the corresponding values into the data table.
As shown in fig. 4, a schematic diagram of one embodiment of a computer storage medium under the SSM framework described above constructed and used as a configuration center is provided for the present invention. Taking a computer storage medium as shown in fig. 4 as an example, the computer readable storage medium 401 stores a computer program 402 that when executed by a processor performs the above method.
Finally, it should be noted that, as will be appreciated by those skilled in the art, implementing all or part of the above-described methods in the embodiments, the processes implemented by the computer program to instruct the relevant hardware may be implemented, and the program for implementing the method for configuring and using the configuration center under the SSM framework may be stored in a computer readable storage medium, where the program may include the processes implemented by the embodiments of the methods described above. The storage medium of the program may be a magnetic disk, an optical disk, a read-only memory (ROM), a random-access memory (RAM), or the like. The computer program embodiments described above may achieve the same or similar effects as any of the method embodiments described above.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that as used herein, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
The foregoing embodiment of the present invention has been disclosed with reference to the number of embodiments for the purpose of description only, and does not represent the advantages or disadvantages of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, and the program may be stored in a computer readable storage medium, where the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Those of ordinary skill in the art will appreciate that: the above discussion of any embodiment is merely exemplary and is not intended to imply that the scope of the disclosure of embodiments of the invention, including the claims, is limited to such examples; combinations of features of the above embodiments or in different embodiments are also possible within the idea of an embodiment of the invention, and many other variations of the different aspects of the embodiments of the invention as described above exist, which are not provided in detail for the sake of brevity. Therefore, any omission, modification, equivalent replacement, improvement, etc. of the embodiments should be included in the protection scope of the embodiments of the present invention.
Claims (6)
1. A method of constructing and using a configuration center under an SSM framework, comprising the steps of:
dividing a configuration center into an interface layer, an implementation layer and a data access object layer;
setting a query interface and a setting interface at the interface layer, and setting realization logic of the query interface and the setting interface at the realization layer;
converting configuration data of multiple dimensions into data of preset dimensions at the data access object layer and storing the data into a data table; and
executing the data table according to the query request or the setting request to acquire the data of the corresponding dimension or writing the data into the data table,
the executing the data table according to the query request or the setting request to acquire the data of the corresponding dimension or writing the data into the data table comprises the following steps:
responding to a received query request, and judging whether a section and/or key value in the query request is legal or not;
responding to the legal section and/or key value in the query request, obtaining the value corresponding to the section and/or key value through the data access object layer,
the executing the data table according to the query request or the setting request to acquire the data of the corresponding dimension or writing the data into the data table comprises the following steps:
and in response to receiving a setting request, determining values corresponding to the section and the key according to the setting request, and writing the section, the key and the corresponding values into the data table.
2. The method of claim 1, wherein the executing the data table to obtain data of the corresponding dimension or writing data to the data table according to a query request or a set request comprises:
and acquiring data of corresponding dimensions in the data table according to the section, key and value values.
3. A system for building and using a configuration center under an SSM framework, comprising:
the division module is configured to divide the configuration center into an interface layer, an implementation layer and a data access object layer;
the first setting module is configured to set a query interface and a setting interface at the interface layer, and set implementation logic of the query interface and the setting interface at the implementation layer;
the second setting module is configured to convert configuration data of multiple dimensions into data of preset dimensions at the data access object layer and store the data into a data table; and
an execution module configured to execute the data table according to a query request or a setting request to acquire data of a corresponding dimension or write data into the data table,
the execution module is configured to:
responding to a received query request, and judging whether a section and/or key value in the query request is legal or not;
responding to the legal section and/or key value in the query request, obtaining the value corresponding to the section and/or key value through the data access object layer,
the execution module is configured to:
and in response to receiving a setting request, determining values corresponding to the section and the key according to the setting request, and writing the section, the key and the corresponding values into the data table.
4. The system of claim 3, wherein the execution module is configured to:
and acquiring data of corresponding dimensions in the data table according to the section, key and value values.
5. A computer device, comprising:
at least one processor; and
a memory storing computer instructions executable on the processor, which when executed by the processor, perform the steps of the method of any one of claims 1-2.
6. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the method of any one of claims 1-2.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110963639.XA CN113704225B (en) | 2021-08-20 | 2021-08-20 | Method, system, device and storage medium for constructing and using configuration center |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110963639.XA CN113704225B (en) | 2021-08-20 | 2021-08-20 | Method, system, device and storage medium for constructing and using configuration center |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113704225A CN113704225A (en) | 2021-11-26 |
CN113704225B true CN113704225B (en) | 2024-02-13 |
Family
ID=78653782
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110963639.XA Active CN113704225B (en) | 2021-08-20 | 2021-08-20 | Method, system, device and storage medium for constructing and using configuration center |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113704225B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101409642A (en) * | 2008-11-21 | 2009-04-15 | 深圳市华冠电气有限公司 | Data service system, data service center and administrative operation method |
CN101706823A (en) * | 2009-12-18 | 2010-05-12 | 中兴通讯股份有限公司 | Inquiry system and method of customized database |
CN109471619A (en) * | 2018-11-20 | 2019-03-15 | 北京千丁互联科技有限公司 | Mybatis code generating method, device and terminal |
CN109710248A (en) * | 2018-12-29 | 2019-05-03 | 江苏徐工信息技术股份有限公司 | A kind of building method based on Web exploitation sub-module frame |
CN110083605A (en) * | 2019-04-24 | 2019-08-02 | 天津中新智冠信息技术有限公司 | Traffic table querying method, device, server and computer readable storage medium |
CN112685443A (en) * | 2021-01-12 | 2021-04-20 | 树根互联技术有限公司 | Data query method and device, electronic equipment and computer readable storage medium |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8869099B2 (en) * | 2008-07-28 | 2014-10-21 | Infosys Limited | System and method of enabling multi-tenancy for software as a service application |
-
2021
- 2021-08-20 CN CN202110963639.XA patent/CN113704225B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101409642A (en) * | 2008-11-21 | 2009-04-15 | 深圳市华冠电气有限公司 | Data service system, data service center and administrative operation method |
CN101706823A (en) * | 2009-12-18 | 2010-05-12 | 中兴通讯股份有限公司 | Inquiry system and method of customized database |
CN109471619A (en) * | 2018-11-20 | 2019-03-15 | 北京千丁互联科技有限公司 | Mybatis code generating method, device and terminal |
CN109710248A (en) * | 2018-12-29 | 2019-05-03 | 江苏徐工信息技术股份有限公司 | A kind of building method based on Web exploitation sub-module frame |
CN110083605A (en) * | 2019-04-24 | 2019-08-02 | 天津中新智冠信息技术有限公司 | Traffic table querying method, device, server and computer readable storage medium |
CN112685443A (en) * | 2021-01-12 | 2021-04-20 | 树根互联技术有限公司 | Data query method and device, electronic equipment and computer readable storage medium |
Non-Patent Citations (2)
Title |
---|
基于Spring的气象数据服务系统设计与实现;高祝宇;何妤斐;曾悠;陈晔峰;杨明;韩颂雨;王亚云;;软件导刊(09);全文 * |
基于SSM框架的Web应用安全机制研究;柯芬芬;刘志华;;无线互联科技(24);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN113704225A (en) | 2021-11-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3701741B1 (en) | Network slice management | |
JP7076819B2 (en) | Move and store encrypted user data | |
US7970823B2 (en) | System for sharing data objects among applications | |
US9077611B2 (en) | Self configuring network management system | |
US9047392B2 (en) | System and method for conversion of JMS message data into database transactions for application to multiple heterogeneous databases | |
US20060069702A1 (en) | System and method for a data protocol layer and the transfer of data objects using the data protocol layer | |
US11176173B2 (en) | Arrangement for enriching data stream in a communications network and related method | |
WO2016123921A1 (en) | Http protocol-based multiple data resource data processing method and system | |
KR20050032618A (en) | Web services apparatus and methods | |
CN114240409A (en) | Cross-chain asset interaction method based on improved Hash time lock | |
CN112905636A (en) | Data manipulation method, server, and computer-readable medium | |
CN109117152B (en) | Service generation system and method | |
CN113704225B (en) | Method, system, device and storage medium for constructing and using configuration center | |
US20080133587A1 (en) | Extending Existing Data within a Directory Service | |
CN210691319U (en) | File information safety management system based on block chain | |
US20230091521A1 (en) | Sharing configuration resources for network devices among applications | |
CN112905617B (en) | Data writing method, server and computer readable storage medium | |
WO2019062850A1 (en) | Data interaction method, device and equipment | |
US20240007876A1 (en) | Restoration of a network slice | |
Olmsted et al. | Buddy System: Available, Consistent, Durable Web Service Transactions | |
CN113783733B (en) | Network link automatic detection system and method based on ICMP protocol principle | |
US20240193048A1 (en) | Systems and methods for disaster recovery management | |
CN113741870B (en) | Method, system, equipment and storage medium for acquiring data in Spring framework | |
CN107480286B (en) | Message processing method and trusted system | |
CN118626677A (en) | Heterogeneous multi-chain oriented general evidence storage and retrieval method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |