CN111259067B - Method, device and equipment for realizing DAO interface based on Spring - Google Patents

Method, device and equipment for realizing DAO interface based on Spring Download PDF

Info

Publication number
CN111259067B
CN111259067B CN202010071423.8A CN202010071423A CN111259067B CN 111259067 B CN111259067 B CN 111259067B CN 202010071423 A CN202010071423 A CN 202010071423A CN 111259067 B CN111259067 B CN 111259067B
Authority
CN
China
Prior art keywords
dao interface
command
execution
dao
annotation
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
Application number
CN202010071423.8A
Other languages
Chinese (zh)
Other versions
CN111259067A (en
Inventor
褚晶晶
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CN202010071423.8A priority Critical patent/CN111259067B/en
Publication of CN111259067A publication Critical patent/CN111259067A/en
Application granted granted Critical
Publication of CN111259067B publication Critical patent/CN111259067B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/315Object-oriented languages
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE 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/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application belongs to the field of data development, and discloses a method, a device and equipment for realizing a DAO interface based on Spring, wherein a predetermined range of a scanning package is designated through a Spring framework, a corresponding relation is established between a DAO interface class with predetermined annotation and a FactoryBean, a corresponding dynamic proxy object is generated and stored in a cache library, if the dynamic proxy object corresponding to a command of the DAO interface class is found, the command is executed, if the dynamic proxy object corresponding to the command is not found, a corresponding characteristic value is generated according to the command and stored in the cache library, then the command is executed, finally if the result set contains a Convertet annotation, the result set is required to be converted into a corresponding target type according to the Convertet annotation and then returned, if the result set does not have the Convertet annotation, the result set is directly returned, the obtained DAO interface is ensured to simultaneously support SQL and HQL, and when application construction is carried out, the whole data migration is not needed, a large amount of XML configuration files are not generated, management is simple and convenient, only a developer needs to maintain the development code, and development efficiency is improved.

Description

Method, device and equipment for realizing DAO interface based on Spring
Technical Field
The present invention relates to the field of data development technologies, and in particular, to a method, an apparatus, and a device for implementing a DAO interface based on Spring.
Background
The DAO schema is one of the standard J2EE (Java 2Platform Enterprise Edition) design schemas that developers use to separate underlying data access operations from the upper business logic, which is collectively referred to as DataAccess Object data access objects, and typical DAO components are divided into DAO factory classes, DAO interface classes, specific classes implementing DAO interfaces, data transfer objects, specific DAO classes containing logic to access data from specific data sources.
The iBATIS is a persistent layer framework supporting Java based on SQL (Structured Query Language ) mapping. The binding between the DAO interface and the XML (Extensible Markup Language) mapping file is supported, the interface realization class is automatically generated, and the development efficiency is improved.
But also causes the following problems:
(1) The iBATIS only supports the SQL structured query language. HQL (Hibernate Query Language) Hibernate query language is not supported.
(2) Based on the applications built on the iBATIS, the cost is high when overall migration is required.
(3) The need to write XML mapping files can result in a large number of XML configuration files, with too many configuration files resulting in difficult management.
(4) Developers have to maintain code and configuration files at the same time, and development efficiency becomes low.
Disclosure of Invention
In view of this, the present application provides a method, apparatus and device for implementing a DAO interface based on Spring. The method mainly aims to solve the technical problems that the cost required by the construction and application of the traditional system framework is high, the additionally generated configuration files are more, and the development efficiency is affected.
Based on the technical problem, a first aspect of the present invention provides a method for implementing a DAO interface based on Spring, where the steps of the method include:
determining a preset range of the scanning package in the spring. Xml configuration file;
scanning DAO interface classes with preset notes in the scanning package within the preset range, and establishing a mapping relation between the FactoryBean and the DAO interface classes with the preset notes;
generating a dynamic proxy object of the DAO interface class with the preset annotation, and storing the dynamic proxy object into a cache library;
receiving a command of a DAO interface class, searching a corresponding dynamic proxy object from the cache library according to the command of the DAO interface class, executing the command of the DAO interface class to obtain a result set if the dynamic proxy object corresponding to the command of the DAO interface class is found, otherwise, generating a characteristic value corresponding to the command of the DAO interface class to be stored in the cache library, and executing the command of the DAO interface class to obtain the result set;
Judging whether the result set contains a conversion annotation, if so, acquiring a target type of a conversion object corresponding to the result set from a parameter of the conversion annotation, converting the result set into the target type, and returning the converted result set, otherwise, directly returning the result set.
Further, the determining the predetermined range of the scanning package in the spring. Xml configuration file specifically includes:
determining a predetermined range of the scanning package in the spring. Xml configuration file by using the beandefminionregistpostprocessor;
setting a corresponding annotation name for the scanning package, wherein the initial annotation name of the scanning package is set as AutoDaoImpl;
matching corresponding entityClass parameters for AutoDaoImpl, and utilizing the entityClass parameters to correspond to entity class objects of specific operations of the DAO interface class with the specified annotation.
Further, the scanning the DAO interface class with the preset annotation in the scanning packet within the preset range, and establishing a mapping relationship between the FactoryBean and the DAO interface class with the preset annotation specifically includes:
scanning DAO interface classes with preset notes in the scanning package within the preset range;
defining a ClassPathBeanDefinitionScnner to generate BeanDefinitions, defining a mapping relation between FactoryBean and a DAO interface class with a predetermined annotation in the BeanDefinitions, and setting a corresponding injection mode for the BeanDefinitions.
Further, the generating the dynamic proxy object of the DAO interface class with the predetermined annotation, and storing the dynamic proxy object into a cache library specifically includes:
setting the DAO interface class with the preset annotation as a custom DAO interface;
and generating a dynamic Proxy object of the custom DAO interface by using the Proxy object and the custom DAO interface, and storing the dynamic Proxy object into a cache library.
Further, the feature value corresponding to the command for generating the DAO interface class is stored in the repository, and specifically includes:
acquiring an execution name from the command of the DAO interface class, and analyzing the execution name to obtain a corresponding return value;
determining corresponding execution parameters according to the execution names, wherein the execution parameters comprise: the method comprises the steps of commonly-used parameters and callback function parameters, wherein index positions of the callback function parameters are recorded in the callback function parameters;
searching a corresponding execution object from the data according to the execution name;
converting the execution object into a corresponding specific object type by using a Convert, wherein the Convert is provided with object types converted correspondingly by various characteristic values and conversion schemes of each object type;
Splitting the execution name according to the naming rule of the execution name to obtain a corresponding characteristic value, and storing the characteristic value in the cache.
Further, the splitting the execution name according to the naming rule of the execution name to obtain a corresponding feature value specifically includes:
splitting the execution name into a prefix, a middle part, a suffix and a keyword according to the naming rule, and taking the prefix, the middle part, the suffix and the keyword obtained by splitting as characteristic values;
wherein the prefix includes, but is not limited to, any one or a combination of the following: save commands, delete commands, modify commands, and query commands;
the middle part is a custom execution service name;
the suffix includes, but is not limited to, any or a combination of the following: querying all data commands, querying commands according to the ID, multi-attribute association querying commands, custom HQL querying commands, custom SQL querying commands and custom SQL logic querying commands;
the keyword is By and is used for separating the prefix, the middle part and the suffix.
Further, the executing the command of the DAO interface class, to obtain a result set, specifically includes:
searching a target characteristic value corresponding to the command of the DAO interface class from the cache library, and determining corresponding execution logic according to the target characteristic value;
And generating corresponding HQL and SQL sentences according to the execution logic and executing the corresponding HQL and SQL sentences to obtain the result set.
The second aspect of the present invention proposes a device for implementing a DAO interface based on Spring, comprising: the determining module, the scanning module, the generating module, the searching module and the judging module are sequentially connected;
the determining module is used for determining a preset range of the scanning package in the spring. Xml configuration file;
the scanning module is used for scanning DAO interface classes with preset notes in the scanning package within the preset range, and establishing a mapping relation between the FactoryBean and the DAO interface classes with the preset notes;
the generation module is used for generating the dynamic proxy object of the DAO interface class with the preset annotation and storing the dynamic proxy object into a cache library;
the searching module is used for receiving a command of a DAO interface class, searching a corresponding dynamic proxy object from the cache library according to the command of the DAO interface class, executing the command of the DAO interface class to obtain a result set if the dynamic proxy object corresponding to the command of the DAO interface class is found, otherwise, generating a characteristic value corresponding to the command of the DAO interface class, storing the characteristic value in the cache library, and executing the command of the DAO interface class to obtain the result set;
The judging module is used for judging whether the result set contains a conversion annotation, if so, acquiring a target type of a conversion object corresponding to the result set from a parameter of the conversion annotation, converting the result set into the target type, and returning the converted result set, otherwise, directly returning the result set.
Further, the determining module specifically includes:
a determining unit, configured to determine a predetermined range of the scanning package by using the beandefminionregistpostprocessor in the spring. Xml configuration file;
the setting unit is used for setting a corresponding annotation name for the scanning package, wherein the initial annotation name of the scanning package is set as AutoDaoImpl;
and the matching unit is used for matching corresponding entityClass parameters for the AutoDaoImpl, and utilizing the entityClass parameters to correspond to entity class objects of the specific operation of the DAO interface class with the specified annotation.
Further, the scanning module specifically includes:
a scanning unit, configured to scan DAO interface classes with predetermined annotations in a scanning packet within the predetermined range;
and the definition unit is used for defining the ClassPathBeanDefinitionScnner to generate BeanDefinitions, defining the mapping relation between the FactoryBean and the DAO interface class with the preset annotation in the BeanDefinitions, and setting a corresponding injection mode for the BeanDefinitions.
Further, the generating module specifically includes:
the setting unit is used for setting the DAO interface class with the preset annotation into a custom DAO interface;
and the generating unit is used for generating a dynamic Proxy object of the custom DAO interface by utilizing the Proxy object and the custom DAO interface, and storing the dynamic Proxy object into a cache library.
Further, the searching module specifically includes:
the analysis unit is used for acquiring an execution name from the command of the DAO interface class, and analyzing the execution name to obtain a corresponding return value;
the parameter determining unit is configured to determine a corresponding execution parameter according to the execution name, where the execution parameter includes: the method comprises the steps of commonly-used parameters and callback function parameters, wherein index positions of the callback function parameters are recorded in the callback function parameters;
the searching unit is used for searching the corresponding execution object from the data according to the execution name;
a conversion unit, configured to Convert the execution object into a corresponding specific object type by using a conversion, where the conversion sets various object types converted by the feature value, and a conversion scheme of each object type;
And the splitting unit is used for splitting the execution name according to the naming rule of the execution name to obtain a corresponding characteristic value, and storing the characteristic value in the cache library.
Further, the splitting unit is specifically configured to:
splitting the execution name into a prefix, a middle part, a suffix and a keyword according to the naming rule, and taking the prefix, the middle part, the suffix and the keyword obtained by splitting as characteristic values;
wherein the prefix includes, but is not limited to, any one or a combination of the following: save commands, delete commands, modify commands, and query commands;
the middle part is a custom execution service name;
the suffix includes, but is not limited to, any or a combination of the following: querying all data commands, querying commands according to the ID, multi-attribute association querying commands, custom HQL querying commands, custom SQL querying commands and custom SQL logic querying commands;
the keyword is By and is used for separating the prefix, the middle part and the suffix.
Further, the searching unit is further configured to search a target feature value corresponding to the command of the DAO interface class from the cache library, and determine corresponding execution logic according to the target feature value;
The searching module specifically further comprises:
and the statement generating unit is used for generating corresponding HQL and SQL statements according to the execution logic and executing the corresponding HQL and SQL statements to obtain the result set.
According to a third aspect of the present application, there is provided a computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the steps of the Spring-based DAO interface method of the first aspect when the computer program is executed.
According to a fourth aspect of the present application, there is provided a computer storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the Spring-based DAO interface method of the first aspect.
By means of the technical scheme, the method, the device and the equipment for realizing the DAO interface based on the Spring are provided, a predetermined range of a scanning packet is designated through a Spring framework, a corresponding relation is established between a DAO interface class with a predetermined annotation and a factor bean, corresponding dynamic proxy objects are generated and stored in a cache library, then when a programmer needs to use the DAO interface class, a command of the DAO interface class is sent, the dynamic proxy objects corresponding to the command are searched from the cache library, if the command is found, the command is executed, if the command is not found, corresponding characteristic values are generated according to the command, the command is stored in the cache library, then the command is executed, finally if the result set contains a conversion annotation, the result set is required to be converted into corresponding target types according to the conversion annotation, and then the result set is returned, if the result set does not contain the conversion annotation, and the result set is directly returned. Therefore, the obtained DAO interface can support SQL and HQL simultaneously, when application construction is carried out, data is not required to be integrally migrated, a large number of XML configuration files are not generated, management is simple and convenient, and a developer only needs to maintain the development code, so that development efficiency is improved.
The foregoing description is only an overview of the technical solutions of the present application, and may be implemented according to the content of the specification in order to make the technical means of the present application more clearly understood, and in order to make the above-mentioned and other objects, features and advantages of the present application more clearly understood, the following detailed description of the present application will be given.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the application. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
FIG. 1 is a flow chart of a method for implementing a DAO interface based on Spring in one embodiment of the present application;
FIG. 2 is a timing diagram of the execution of one embodiment of the present application;
FIG. 3 is a flow chart of a method for implementing a DAO interface based on Spring in another embodiment of the present application;
FIG. 4 is a system block diagram of an apparatus for implementing a DAO interface based on Spring in yet another embodiment of the present application;
fig. 5 is a schematic structural diagram of a computer device of the present application.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
As shown in fig. 1, a first embodiment of the present application provides a method for implementing a DAO interface based on Spring, including the following steps:
step 101, determining a predetermined range of the scanning package in the spring. Xml configuration file.
In this step, the Spring. Xml configuration file is an xml configuration file under the Spring system framework. And calling the xml configuration files under the Spring system framework according to the needs, and designating a preset range of the corresponding required scanning package from all the xml configuration files so as to scan the scanning package according to the preset range.
Step 102, scanning DAO interface classes with preset notes in a scanning package in a preset range, and establishing mapping relation between a FactoryBean (factory Bean) and the DAO interface classes with preset notes.
In this step, since Spring provides a factory class interface of org.
And step 103, generating a dynamic proxy object of the DAO interface class with the preset annotation, and storing the dynamic proxy object into a cache library.
In the step, the obtained DAO interface class with the preset annotation is dynamically analyzed to generate corresponding dynamic proxy objects, each dynamic proxy corresponds to the DAO interface class with the preset annotation one by one, and then the dynamic proxy objects are stored in a cache library for subsequent searching.
Step 104, receiving the command of the DAO interface class, searching the corresponding dynamic proxy object from the cache library according to the command of the DAO interface class, if the dynamic proxy object corresponding to the command of the DAO interface class is found, executing the command of the DAO interface class to obtain a result set, otherwise, generating a characteristic value corresponding to the command of the DAO interface class, storing the characteristic value in the cache library, and executing the command of the DAO interface class to obtain the result set.
In this step, when the developer wants to use, a command of the DAO interface class is issued, and a result set after executing the command is obtained according to the above scheme of this step. Therefore, a large amount of XML configuration files cannot be generated in the execution process, so that the management of developers is simple and convenient.
Step 105, judging whether the result set contains the conversion annotation, if yes, acquiring the target type of the conversion object corresponding to the result set from the parameter of the conversion annotation, converting the result set into the target type, and returning the converted result set, otherwise, directly returning the result set.
In this step, some of the result sets need to be converted into corresponding object types, which are attributes of respective data of the result sets, for example, a person is a type, and each living person is an individual, which is a specific object.
The result set is subjected to type conversion, so that a developer can understand the result set, and development efficiency is effectively improved.
Through the scheme, the predetermined range of the scanning package is designated through the Spring framework, the DAO interface class with the predetermined annotation and the FactoryBean are established to correspond to each other, corresponding dynamic proxy objects are generated and stored in the cache library, then when a programmer needs to use the dynamic proxy objects, the command of the DAO interface class is sent, the dynamic proxy objects corresponding to the command are searched from the cache library, if the command is found, the command is executed, if the command is not found, corresponding characteristic values are generated according to the command, the command is stored in the cache library, then the command is executed, finally if the result set contains the conversion annotation, the result set is converted into the corresponding target type according to the conversion annotation and then returned, and if the conversion annotation does not exist in the result set, the result set is directly returned. Therefore, the obtained DAO interface can simultaneously support SQL and HQL, when the obtained DAO interface is used for application construction, the whole data is not required to be migrated, the cost is effectively reduced, a large number of XML configuration files are not generated when the application construction is carried out, the management is simple and convenient, and a developer only needs to maintain the development code during the later maintenance, so that the development efficiency is effectively improved.
In a specific embodiment, step 101 specifically includes:
in step 1011, a predetermined range of the scan package is determined in the spring. Xml configuration file using the beandefminionRegistryPostProcessor.
In this step, the BeanDefinitionRegistryPostProcessor is inherited from the BeanFactoyPostProcessor, a more specific BeanFactoyPostProcessor. The postProcessBeanDefinitionRegistry (BeanDefinitionRegistry registry) method defined in the BeanDefinition RegistryPostProcessor can implement custom registration bean definition logic, so that the scanning range of xml configuration files in the Spring framework is defined by using the BeanDefinition RegistryPostProcessor.
Step 1012, setting a corresponding annotation name for the scan packet, wherein the initial annotation name of the scan packet is AutoDaoImpl.
In this step, the name AutoDaoImpl can be set according to the actual needs of the developer.
In step 1013, the entity class object of the specific operation of the DAO interface class with the specified annotation is mapped to the corresponding entityClass parameter for the AutoDaoImpl matching.
In the step, the entity class parameter refers to an entity classification parameter, and a corresponding entity class object is determined according to a specific execution operation corresponding to the DAO interface class with the specified annotation, so that an accurate dynamic proxy object can be generated after dynamic analysis according to the DAO interface class with the specified annotation is ensured.
In a specific embodiment, step 102 specifically includes:
step 1021, scan DAO interface classes with predetermined annotations in scan packets within a predetermined range.
Step 1022, defining a ClassPathBeanDefinitionScnner to generate BeanDefinitions, defining a mapping relationship between FactoryBean and DAO interface class with predetermined annotation in the BeanDefinitions, and setting a corresponding injection mode for the BeanDefinitions.
In the above scheme, the class scanner whose ClassPathBeanDefinitionScanner is Spring analyzes that the ClassPathBeanDefinitionScanner action is the class under the specified package.
Filtering the DAO interface class with the preset annotation searched from the lower surface of the specified package by utilizing a filter, packaging the mapping relation between the FactoryBean and the DAO interface class with the preset annotation into a BeanDefinition form, and registering the BeanDefinition form into an IOC container.
In a specific embodiment, step 103 specifically includes:
step 1031, setting the DAO interface class with the predetermined annotation to a custom DAO interface.
In step 1032, the Proxy object and the custom DAO interface are utilized to generate a dynamic Proxy object of the custom DAO interface, and the dynamic Proxy object is stored in the cache library.
In the above scheme, proxy objects are created by Proxy 1 Proxy objects, and then some behaviors of specified objects are allowed to be customized by operating the Proxy objects. And therefore, the Proxy object is utilized to carry out dynamic customization processing on the customized DAO interface, corresponding dynamic Proxy objects are generated, and the dynamic Proxy objects are stored in a cache library for subsequent searching.
The method comprises the following steps: the Proxy constructor receives 2 objects, the 1 st parameter being the object to be processed (i.e., the custom DAO interface), and the 2 nd parameter being the collection of post-custom methods (i.e., the dynamic Proxy objects).
In a specific embodiment, step 104 further comprises:
step 1041, obtaining an execution name from the command of the DAO interface class, and analyzing the execution name to obtain a corresponding return value.
In this step, the command of each DAO interface class carries the execution name of the corresponding execution task, and the analysis is performed according to the execution task corresponding to the execution name, so as to obtain a return value matched with the execution task. The type of the return value, such as the base type, object type, is recorded in the return value.
Step 1042, determining corresponding execution parameters according to the execution name, wherein the execution parameters include: the method comprises the steps of commonly-used parameters and callback function parameters, wherein index positions of the callback function parameters are recorded in the callback function parameters.
In this step, the execution parameter corresponding to the execution name is determined according to the return value. The common parameter refers to an attribute name of an entity class, and if the entity class is a human, the attribute name may be name, age, etc.
The callback function parameter records index positions have the advantage that anonymous internal classes can be flexibly transmitted into different positions of the callback function parameters, and the callback function parameters are not limited to specific transmission positions. User-defined business logic can be implemented with anonymous internal classes.
Step 1043, searching for a corresponding execution object from the data according to the execution name.
In this step, each execution name corresponds to a plurality of execution objects.
In step 1044, the execution object is converted into a corresponding specific object type by using the Convert, where the Convert sets the object types corresponding to the conversion of the various feature values and the conversion scheme of each object type.
In this step, the Convert is a file system modification command, and the execution object may be subjected to modification conversion.
Step 1045, splitting the execution name according to the naming rule of the execution name, obtaining a corresponding feature value, and storing the feature value in the repository.
In this step, each execution name has a corresponding naming rule, for example, what value the front end is, and what value the back end is. Splitting the execution name into a plurality of parts according to naming rules of various execution names, taking the split result as a characteristic value, associating the characteristic value with a DAO interface class in a command of the DAO interface class, and storing the characteristic value in a cache library for subsequent searching.
In a specific embodiment, step 1045 specifically includes: splitting the execution name into a prefix, a middle part, a suffix and a keyword according to the naming rule, and taking the prefix, the middle part, the suffix and the keyword obtained by splitting as characteristic values.
Wherein the prefix includes, but is not limited to, any one or a combination of the following: save commands, delete commands, modify commands, and query commands.
The middle part is the name of the custom execution service.
Suffixes include, but are not limited to, any or a combination of the following: query all data commands, query commands based on ID, multi-attribute association, custom HQL, custom SQL logical query commands.
The keyword is By, which is used to separate the prefix, middle and suffix.
For example: prefix identification includes, but is not limited to: and (3) increasing: void saveXX (T obj), update: voidupdateXXXX (T obj), add or update: void saveOrUpdateXXXX (tobj), delete: voiddeleteXXXXById (Integerid);
the suffix identification includes but is not limited to: according to the ID query: t getxxxxxbyid (intelgerid), multi-attribute association query: t getXXXXByProperty1AndProperty2 (String Property1, int Property 2), custom HQL query: t getUniqueXXXXByHql (String hql, object [ ] args), custom SQL query: t getXXXXBySqlCommand (ISqlCommand < T > sqlCommand), find and return the translated object according to ID: @ Convertet (clazz=XXX.class) XXX getXXXXById (Integerid). In addition, the method comprises the following steps. The multi-attribute associated query command in the suffix includes: and or, non-logical relationships between multiple attributes in the entity class object.
Through the scheme, all the characteristic values after analysis are stored in the cache, so that secondary analysis is avoided, and the processing efficiency is effectively improved.
In a specific embodiment, step 104 further comprises:
step 1046, searching the target feature value corresponding to the command of the DAO interface class from the cache library, and determining the corresponding execution logic according to the target feature value.
Step 1047, generating corresponding HQL and SQL statements according to the execution logic and executing to obtain a result set.
In the above scheme, the feature values corresponding to each DAO interface class are stored in the cache library, the feature values found are searched from the cache library according to the command of the DAO interface class, the found feature values are used as target feature values, the target feature values comprise a plurality of data values, and the data values are generated to generate corresponding HQL and SQL sentences according to the execution logic. And then executing according to the HQL and SQL sentences, obtaining corresponding processing results by each sentence, and integrating the results to form a result set.
And finally, converting the conversion objects of which the result set can be subjected to type conversion into corresponding target types according to the step 105, and returning the obtained result set to a developer for processing.
Through the scheme of the embodiment, the obtained DAO interface can simultaneously support SQL and HQL, when the obtained DAO interface is used for application construction, the whole data is not required to be migrated, the cost is effectively reduced, a large number of XML configuration files are not generated when the application construction is carried out, the management is simple and convenient, and a developer only needs to maintain the development code during the later maintenance, so that the development efficiency is effectively improved.
Another embodiment of the present application proposes a method for implementing a DAO interface based on Spring, and an execution timing diagram is shown in fig. 2.
The implementation process of the embodiment comprises the following steps:
and scanning the DAO interface class with the specified annotation under the specified packet, and generating the corresponding relation between the FactoryBean and the DAO interface class.
And generating a DAO dynamic proxy class corresponding to the DAO interface class.
And (3) receiving a method of the DAO interface class (namely, a command of the DAO interface class), judging whether the method exists in the corresponding DAO proxy class, if so, executing the found method of the DAO proxy class, returning an execution result (namely, a result set), otherwise, generating a characteristic value of the method of the DAO interface class in the DAO proxy class, executing the method, and returning an execution result.
When the returned result is executed, if the conversion annotation is specified in the returned result, the converted class (i.e., the target type) is specified in the conversion parameter, and the result set in the returned result is automatically converted into the specified class.
The DAO interface class with the specified annotation under the specified package is firstly scanned, the scope of the scanned package is specified by utilizing the custom implementation class inherited by the BeanDefinition RegistryPostprocessor in the spring.xml configuration file, the annotation name is indicated, the default implementation annotation is AutoDaoImpl (namely, the initial annotation name), and the DAO interface class with the annotation becomes the target of being automatically implemented. The annotation carries an entityClass parameter value that is used to specify the corresponding entity class object for the DAO interface class operation.
Generating a correspondence of a FactoryBean to a DAO interface class refers to custom implementation of ClassPathBeanDefinitionScanner to generate BeanDefinition, beanDefinition is an instance of a Bean described in Spring, including attribute values, construction method parameter values, and more information of the class inherited from it. The FactoryBean and DAO interface is defined in BeanDefinition and the injection mode is set.
A FactoyBean is a factory Bean whose returned object is not an instance of a specified class, but rather is the object returned by the FactoyBean's getObject method. Then in the getObject method, the Proxy object and the custom DAO interface are utilized to generate the dynamic Proxy object for the interface.
When a method of the DAO interface is called, judging whether the method exists in a corresponding DAO proxy class, searching the called method name in a method cache, judging whether the method definition exists, and if not, analyzing the method and storing the method in the cache.
The analysis method characteristic value comprises the steps of analyzing a return value of a method according to a called method name, acquiring a method parameter according to the method name, acquiring an annotation on the method name, and splitting the method name according to a method naming rule.
The return value of the method analyzes the type of the record return value, such as the basic type and the object type.
The method parameters are obtained and divided into general parameters and callback function parameters, the callback function parameters record index positions of the callback function parameters. The benefit of recording the index location is that anonymous internal classes can be flexibly imported at different locations of callback function parameters, without being limited to specifying specific import locations. User-defined business logic can be implemented with anonymous internal classes.
And obtaining whether a overt annotation exists on the name of the method. Convert annotations provide class conversion capabilities that can Convert the result set of a query into a corresponding class object. The clazz parameter in Converter specifies the class object after transformation.
Dividing the method name into four parts of prefix, middle part, suffix and keyword according to rules, wherein the prefix mark is stored, deleted, modified and inquired. The middle part is a custom service name. The suffix is used for inquiring all data, inquiring according to the ID, correlating the inquiry with multiple attributes, customizing the HQL inquiry, customizing the SQL inquiry and customizing the SQL logic inquiry. The keyword is By, which is used to distinguish the suffix portion.
For example:
and (3) increasing: void saveXX (T obj);
updating: voidupdateXXXX (T obj);
adding or updating: void saveOrUpdateXXXX (tobj);
Deletion: void deleteXXXXById (intelger id);
according to the ID query: t getxxxxxbyid (intelger id);
multi-attribute association query: t getXXXXByProperty1AndProperty2 (String Property1, int Property 2);
custom HQL query: t getUniqueXXXXByHql (String hql, object [ ] args);
custom SQL queries: t getXXXXBySqlCommand (ISqlCommand < T > sqlCommand);
searching and returning the converted object according to the ID:
@Convert(clazz=XXX.class)
XXX getXXXXById(Integerid)。
and storing the analyzed method characteristic value into a cache, avoiding secondary analysis and accelerating the processing efficiency.
And finding out corresponding execution logic according to the feature values processed in the cache each time, generating corresponding HQL and SQL sentences to be utilized and executed, and returning a result set.
As shown in fig. 3, the implementation procedure of this embodiment is specifically:
the agent calls an interface method and uses Hash to address;
searching from a method cache area, and judging whether the interface method exists or not;
if not found, inputting the interface method into a method characteristic value analyzer, analyzing the interface method successfully after processing through a return value type recorder, a destruction function position recorder, a keyword analyzer, a conversion type recorder, a conversion type attribute buffer area, a hump naming analyzer, an SQL splice and an HQL splice, and storing analysis results into the buffer area;
If the method is found, inputting the interface method into a method execution area, and processing the interface method by a characteristic value analyzer, a method parameter analyzer, an SQL analyzer, an HQL analyzer and a Query analyzer to obtain a result set;
and inputting the obtained result set into a result set converter for conversion processing, and outputting a target result set.
Through the scheme of the embodiment, the DAO interface can be automatically realized in an annotating mode without the framework of the iBATIS, zero configuration and no migration problem are realized, and the effects of SQL and HQL are simultaneously supported.
Yet another embodiment of the present application proposes a device for implementing a DAO interface based on Spring, as shown in fig. 4, including: the determining module, the scanning module, the generating module, the searching module and the judging module are sequentially connected;
the determining module is used for determining a preset range of the scanning package in the spring. Xml configuration file;
the scanning module is used for scanning DAO interface classes with preset notes in a scanning packet in a preset range, and establishing a mapping relation between the FactoryBean and the DAO interface classes with the preset notes;
the generation module is used for generating a dynamic proxy object of the DAO interface class with the preset annotation and storing the dynamic proxy object into the cache library;
the searching module is used for receiving the command of the DAO interface class, searching a corresponding dynamic proxy object from the cache library according to the command of the DAO interface class, executing the command of the DAO interface class to obtain a result set if the dynamic proxy object corresponding to the command of the DAO interface class is found, otherwise, generating a characteristic value corresponding to the command of the DAO interface class, storing the characteristic value in the cache library, and executing the command of the DAO interface class to obtain the result set;
The judging module is used for judging whether the result set contains the conversion annotation, if so, acquiring the target type of the conversion object corresponding to the result set from the parameter of the conversion annotation, converting the result set into the target type, and returning the converted result set, otherwise, directly returning the result set.
In a specific embodiment, the determining module specifically includes:
a determining unit, configured to determine a predetermined range of the scanning package by using the beandefminionregistpostprocessor in the spring. Xml configuration file;
the setting unit is used for setting a corresponding annotation name for the scanning package, wherein the initial annotation name of the scanning package is set as AutoDaoImpl;
and the matching unit is used for matching corresponding entityClass parameters for the AutoDaoImpl, and utilizing the entityClass parameters to correspond to entity class objects with specific operations of the specified annotated DAO interface class.
In a specific embodiment, the scanning module specifically includes:
a scanning unit for scanning DAO interface class with preset annotation in the scanning packet in preset range;
and the definition unit is used for defining the ClassPathBeanDefinitionScnner to generate BeanDefinitions, defining the mapping relation between the FactoryBean and the DAO interface class with the preset annotation in the BeanDefinitions, and setting a corresponding injection mode for the BeanDefinitions.
In a specific embodiment, the generating module specifically includes:
the setting unit is used for setting the DAO interface class with the preset annotation into a custom DAO interface;
and the generating unit is used for generating a dynamic Proxy object of the custom DAO interface by utilizing the Proxy object and the custom DAO interface, and storing the dynamic Proxy object into the cache library.
In a specific embodiment, the searching module specifically includes:
the analysis unit is used for acquiring an execution name from the command of the DAO interface class, and analyzing the execution name to obtain a corresponding return value;
the parameter determining unit is configured to determine a corresponding execution parameter according to an execution name, where the execution parameter includes: the method comprises the steps of commonly-used parameters and callback function parameters, wherein index positions of the callback function parameters are recorded in the callback function parameters;
the searching unit is used for searching the corresponding execution object from the data according to the execution name;
a conversion unit, configured to Convert an execution object into a corresponding specific object type by using a Convert, where the Convert sets object types corresponding to the conversion of various feature values and conversion schemes of each object type;
and the splitting unit is used for splitting the execution name according to the naming rule of the execution name to obtain a corresponding characteristic value, and storing the characteristic value in the cache library.
In a specific embodiment, the splitting unit is specifically configured to:
splitting the execution name into a prefix, a middle part, a suffix and a keyword according to a naming rule, and taking the prefix, the middle part, the suffix and the keyword obtained by splitting as characteristic values;
wherein the prefix includes, but is not limited to, any one or a combination of the following: save commands, delete commands, modify commands, and query commands;
the middle part is a custom execution service name;
suffixes include, but are not limited to, any or a combination of the following: querying all data commands, querying commands according to the ID, multi-attribute association querying commands, custom HQL querying commands, custom SQL querying commands and custom SQL logic querying commands;
the keyword is By, which is used to separate the prefix, middle and suffix.
In a specific embodiment, the searching unit is further configured to search a target feature value corresponding to a command of the DAO interface class from the cache library, and determine corresponding execution logic according to the target feature value;
the searching module specifically further comprises:
and the statement generating unit is used for generating corresponding HQL and SQL statements according to the execution logic and executing the corresponding HQL and SQL statements to obtain a result set.
Based on the embodiment of the method and the device for implementing the DAO interface based on Spring, in order to implement the above objective, the embodiments of the present application further provide a computer device, as shown in fig. 5, including a memory and a processor, where the memory and the processor are both disposed on a bus, and the memory stores a computer program, and when the processor executes the computer program, the processor implements the method for implementing the DAO interface based on Spring shown in fig. 1.
Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, which may be stored in a non-volatile memory (may be a CD-ROM, a U-disk, a mobile hard disk, etc.), and includes several instructions for causing a computer device (may be a personal computer, a server, or a network device, etc.) to perform the methods described in various implementation scenarios of the present application.
Optionally, the device may also be connected to a user interface, a network interface, a camera, radio Frequency (RF) circuitry, sensors, audio circuitry, WI-FI modules, etc. The user interface may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (e.g., bluetooth interface, WI-FI interface), etc.
It will be appreciated by those skilled in the art that the structure of a computer device provided in this embodiment is not limited to the physical device, and may include more or fewer components, or may combine certain components, or may be arranged in different components.
Based on the embodiment of the method shown in fig. 1 and the device shown in fig. 4, correspondingly, the embodiment of the application also provides a storage medium, on which a computer program is stored, and when the program is executed by a processor, the method for implementing the DAO interface based on Spring shown in fig. 1 is implemented.
From the above description of the embodiments, it will be apparent to those skilled in the art that the present application may be implemented by means of software plus necessary general hardware platforms, or may be implemented by hardware.
By applying the technical scheme, a Spring framework is utilized to specify a preset range of a scanning packet, a corresponding relation is established between a DAO interface class with preset annotation and a FactoryBean, a corresponding dynamic proxy object is generated and stored in a cache library, then when a programmer needs to use, a command of the DAO interface class is sent, a dynamic proxy object corresponding to the command is searched from the cache library, if the command is found, the command is executed, if the command is not found, a corresponding characteristic value is generated according to the command, the command is stored in the cache library, the command is executed again, finally, if the result set contains a Convert annotation, the result set is required to be converted into a corresponding target type according to the Convert annotation and then returned, and if the result set does not have the Convert annotation, the result set is directly returned. Therefore, the obtained DAO interface can support SQL and HQL simultaneously, when application construction is carried out, data is not required to be integrally migrated, a large number of XML configuration files are not generated, management is simple and convenient, and a developer only needs to maintain the development code, so that development efficiency is improved.
Those skilled in the art will appreciate that the drawings are merely schematic illustrations of one preferred implementation scenario, and that the modules or flows in the drawings are not necessarily required to practice the present application. Those skilled in the art will appreciate that modules in an apparatus in an implementation scenario may be distributed in an apparatus in an implementation scenario according to an implementation scenario description, or that corresponding changes may be located in one or more apparatuses different from the implementation scenario. The modules of the implementation scenario may be combined into one module, or may be further split into a plurality of sub-modules.
The foregoing application serial numbers are merely for description, and do not represent advantages or disadvantages of the implementation scenario. The foregoing disclosure is merely a few specific implementations of the present application, but the present application is not limited thereto and any variations that can be considered by a person skilled in the art shall fall within the protection scope of the present application.

Claims (8)

1. A method for implementing a DAO interface based on Spring, the method comprising the steps of:
determining a preset range of the scanning package in the spring. Xml configuration file;
scanning DAO interface classes with preset notes in the scanning package within the preset range, and establishing a mapping relation between the FactoryBean and the DAO interface classes with the preset notes;
Generating a dynamic proxy object of the DAO interface class with the preset annotation, and storing the dynamic proxy object into a cache library;
receiving a command of a DAO interface class, searching a corresponding dynamic proxy object from the cache library according to the command of the DAO interface class, executing the command of the DAO interface class to obtain a result set if the dynamic proxy object corresponding to the command of the DAO interface class is found, otherwise, generating a characteristic value corresponding to the command of the DAO interface class to be stored in the cache library, and executing the command of the DAO interface class to obtain the result set;
judging whether the result set contains a overt annotation, if so, acquiring a target type of a conversion object corresponding to the result set from a parameter of the overt annotation, converting the result set into the target type, and returning the converted result set, otherwise, directly returning the result set;
the scanning of the DAO interface class with the preset annotation in the scanning package within the preset range establishes a mapping relation between the FactoryBean and the DAO interface class with the preset annotation, and the specific steps include:
scanning DAO interface classes with preset notes in the scanning package within the preset range, and filtering the DAO interface classes with preset notes by using a filter;
Defining a ClassPathBeanDefinitionScnner to generate BeanDefinitions, defining a mapping relation between FactoryBean and a DAO interface class with a preset annotation in the BeanDefinitions, setting a corresponding injection mode for the BeanDefinitions, and injecting the BeanDefinitions into an IOC container;
the feature value corresponding to the command for generating the DAO interface class is stored in the cache library, and specifically includes:
acquiring an execution name from the command of the DAO interface class, and analyzing the execution name to obtain a corresponding return value;
determining corresponding execution parameters according to the execution names, wherein the execution parameters comprise: the method comprises the steps of commonly-used parameters and callback function parameters, wherein index positions of the callback function parameters are recorded in the callback function parameters;
searching a corresponding execution object from the data according to the execution name;
converting the execution object into a corresponding specific object type by using a Convert, wherein the Convert is provided with object types converted correspondingly by various characteristic values and conversion schemes of each object type;
splitting the execution name according to the naming rule of the execution name to obtain a corresponding characteristic value, and storing the characteristic value in the cache.
2. The method according to claim 1, wherein determining the predetermined range of the scanning package in the spring. Xml configuration file specifically includes:
determining a predetermined range of the scanning package in the spring. Xml configuration file by using the beandefminionregistpostprocessor;
setting a corresponding annotation name for the scanning package, wherein the initial annotation name of the scanning package is set as AutoDaoImpl;
matching corresponding entityClass parameters for AutoDaoImpl, and utilizing the entityClass parameters to correspond to entity class objects of specific operations of the DAO interface class with the preset annotation.
3. The method according to claim 1, wherein generating the dynamic proxy object of the DAO interface class with the predetermined annotation and storing the dynamic proxy object in a cache library, specifically comprises:
setting the DAO interface class with the preset annotation as a custom DAO interface;
and generating a dynamic Proxy object of the custom DAO interface by using the Proxy object and the custom DAO interface, and storing the dynamic Proxy object into a cache library.
4. The method according to claim 1, wherein the splitting the execution name according to the naming rule of the execution name to obtain the corresponding feature value specifically includes:
Splitting the execution name into a prefix, a middle part, a suffix and a keyword according to the naming rule, and taking the prefix, the middle part, the suffix and the keyword obtained by splitting as characteristic values;
wherein the prefix includes, but is not limited to, any one or a combination of the following: save commands, delete commands, modify commands, and query commands;
the middle part is a custom execution service name;
the suffix includes, but is not limited to, any or a combination of the following: querying all data commands, querying commands according to the ID, multi-attribute association querying commands, custom HQL querying commands, custom SQL querying commands and custom SQL logic querying commands;
the keyword is By and is used for separating the prefix, the middle part and the suffix.
5. The method according to claim 1, wherein said executing said DAO interface class command results in a result set, comprising in particular:
searching a target characteristic value corresponding to the command of the DAO interface class from the cache library, and determining corresponding execution logic according to the target characteristic value;
and generating corresponding HQL and SQL sentences according to the execution logic and executing the corresponding HQL and SQL sentences to obtain the result set.
6. A device for implementing a DAO interface based on Spring, comprising: the determining module, the scanning module, the generating module, the searching module and the judging module are sequentially connected;
The determining module is used for determining a preset range of the scanning package in the spring. Xml configuration file;
the scanning module is used for scanning DAO interface classes with preset notes in the scanning package within the preset range, and establishing a mapping relation between the FactoryBean and the DAO interface classes with the preset notes;
the generation module is used for generating the dynamic proxy object of the DAO interface class with the preset annotation and storing the dynamic proxy object into a cache library;
the searching module is used for receiving a command of a DAO interface class, searching a corresponding dynamic proxy object from the cache library according to the command of the DAO interface class, executing the command of the DAO interface class to obtain a result set if the dynamic proxy object corresponding to the command of the DAO interface class is found, otherwise, generating a characteristic value corresponding to the command of the DAO interface class, storing the characteristic value in the cache library, and executing the command of the DAO interface class to obtain the result set;
the judging module is used for judging whether the result set contains a overt annotation, if so, acquiring a target type of a conversion object corresponding to the result set from a parameter of the overt annotation, converting the result set into the target type, and returning the converted result set, otherwise, directly returning the result set;
The scanning module specifically comprises:
a scanning unit for scanning DAO interface class with preset annotation in the scanning packet in preset range;
the definition unit is used for defining the ClassPathBeanDefinitionScnner to generate BeanDefinitions, defining the mapping relation between the FactoryBean and the DAO interface class with the preset annotation in the BeanDefinitions, and setting a corresponding injection mode for the BeanDefinitions;
the searching module specifically comprises:
the analysis unit is used for acquiring an execution name from the command of the DAO interface class, and analyzing the execution name to obtain a corresponding return value;
the parameter determining unit is configured to determine a corresponding execution parameter according to an execution name, where the execution parameter includes: the method comprises the steps of commonly-used parameters and callback function parameters, wherein index positions of the callback function parameters are recorded in the callback function parameters;
the searching unit is used for searching the corresponding execution object from the data according to the execution name;
a conversion unit, configured to Convert an execution object into a corresponding specific object type by using a Convert, where the Convert sets object types corresponding to the conversion of various feature values and conversion schemes of each object type;
and the splitting unit is used for splitting the execution name according to the naming rule of the execution name to obtain a corresponding characteristic value, and storing the characteristic value in the cache library.
7. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the Spring-based DAO interface method of any one of claims 1 to 5.
8. A computer storage medium having stored thereon a computer program, which when executed by a processor realizes the steps of the Spring based DAO interface method of any of claims 1 to 5.
CN202010071423.8A 2020-01-21 2020-01-21 Method, device and equipment for realizing DAO interface based on Spring Active CN111259067B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010071423.8A CN111259067B (en) 2020-01-21 2020-01-21 Method, device and equipment for realizing DAO interface based on Spring

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010071423.8A CN111259067B (en) 2020-01-21 2020-01-21 Method, device and equipment for realizing DAO interface based on Spring

Publications (2)

Publication Number Publication Date
CN111259067A CN111259067A (en) 2020-06-09
CN111259067B true CN111259067B (en) 2023-06-06

Family

ID=70950980

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010071423.8A Active CN111259067B (en) 2020-01-21 2020-01-21 Method, device and equipment for realizing DAO interface based on Spring

Country Status (1)

Country Link
CN (1) CN111259067B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111752601A (en) * 2020-06-19 2020-10-09 贝壳技术有限公司 Data configuration method, device and system, electronic equipment and storage medium thereof
CN111831318A (en) * 2020-06-30 2020-10-27 山东大学 Micro-service management system capable of automatically generating codes and code generation method
CN114090193A (en) * 2021-12-03 2022-02-25 深圳前海微众银行股份有限公司 Request processing method and device
CN113986338B (en) * 2021-12-28 2022-04-15 深圳市明源云科技有限公司 Project package scanning method, system, equipment and computer readable storage medium
CN116501415B (en) * 2023-06-30 2023-09-22 英诺达(成都)电子科技有限公司 Command execution method and device, electronic equipment and computer readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102819588A (en) * 2012-08-06 2012-12-12 南京中兴软创科技股份有限公司 Dynamic data processing method applied to Oracle database
CN105138646A (en) * 2015-08-26 2015-12-09 浪潮集团有限公司 Database operation method based on Hibernate
CN105373536A (en) * 2014-08-19 2016-03-02 阿里巴巴集团控股有限公司 DAO interface realizing method and device
CN105447151A (en) * 2015-11-27 2016-03-30 深圳市金蝶友商电子商务服务有限公司 Method for accessing distributed database, data source proxy apparatus and application server
CN105843609A (en) * 2016-03-18 2016-08-10 浪潮软件集团有限公司 MVC frame based on Spring and MyBatis
CN110046170A (en) * 2019-04-22 2019-07-23 深圳乐信软件技术有限公司 Sentence based on multifile management executes method, apparatus, equipment and medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030023601A1 (en) * 2001-05-08 2003-01-30 Fortier Joseph W. System and method for intercommunication among disparate communication networks
US8380880B2 (en) * 2007-02-02 2013-02-19 The Mathworks, Inc. Scalable architecture
US20130110799A1 (en) * 2011-10-31 2013-05-02 Sally Blue Hoppe Access to heterogeneous data sources
US10606573B2 (en) * 2017-06-07 2020-03-31 Syntel, Inc. System and method for computer language migration using a re-architecture tool for decomposing a legacy system and recomposing a modernized system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102819588A (en) * 2012-08-06 2012-12-12 南京中兴软创科技股份有限公司 Dynamic data processing method applied to Oracle database
CN105373536A (en) * 2014-08-19 2016-03-02 阿里巴巴集团控股有限公司 DAO interface realizing method and device
CN105138646A (en) * 2015-08-26 2015-12-09 浪潮集团有限公司 Database operation method based on Hibernate
CN105447151A (en) * 2015-11-27 2016-03-30 深圳市金蝶友商电子商务服务有限公司 Method for accessing distributed database, data source proxy apparatus and application server
CN105843609A (en) * 2016-03-18 2016-08-10 浪潮软件集团有限公司 MVC frame based on Spring and MyBatis
CN110046170A (en) * 2019-04-22 2019-07-23 深圳乐信软件技术有限公司 Sentence based on multifile management executes method, apparatus, equipment and medium

Also Published As

Publication number Publication date
CN111259067A (en) 2020-06-09

Similar Documents

Publication Publication Date Title
CN111259067B (en) Method, device and equipment for realizing DAO interface based on Spring
US7111075B2 (en) Method and system for processing data records having multiple formats
US8260815B2 (en) System and method for accessing non-compatible content repositories
US9026901B2 (en) Viewing annotations across multiple applications
Clifford et al. Tracking provenance in a virtual data grid
US20160357788A1 (en) Resource name generation and derivation
CN105940410A (en) Scrubber to remove personally identifiable information
US20100094803A1 (en) Data management apparatus, method and program
JP5600736B2 (en) Database management method and system
CN106648569B (en) Target serialization realization method and device
CN111367976A (en) Method and device for exporting EXCEL file data based on JAVA reflection mechanism
CN111818175A (en) Enterprise service bus configuration file generation method, device, equipment and storage medium
CN108694172B (en) Information output method and device
CN102508673A (en) System and method for rapidly developing and configuring platform software
KR100762712B1 (en) Method for transforming of electronic document based on mapping rule and system thereof
US11244000B2 (en) Information processing apparatus and non-transitory computer readable medium storing program for creating index for document retrieval
US20230237019A1 (en) Terminal and method for storing and parsing log data
CN110941629A (en) Metadata processing method, device, equipment and computer readable storage medium
CN115757174A (en) Database difference detection method and device
CN114334051A (en) Medical data synchronization method, device, electronic device and storage medium
CN113011145A (en) Data export method and device, terminal equipment and storage medium
CN113312373A (en) Method and equipment for analyzing data structured query statement
CN115774767B (en) Geographic information metadata processing method and device
CN111143156A (en) Large data platform garbage task acquisition system and method and computer system
CN117093597B (en) Data processing method and device

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