Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method, device and system for intercepting dao layer verification sql based on springaop

An interceptor and verification module technology, applied in the computer field, can solve problems such as table mapping together, error reporting, and inability to meet individual needs, so as to reduce consumption and improve efficiency

Active Publication Date: 2021-02-09
政采云有限公司
View PDF10 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The open source framework hibernate is a relatively heavy-duty ORM framework with many components, and HQL (query language) is a double-edged sword that cannot meet the growing individual needs
In the current popular distributed microservices, MyBatis is more flexible and compact, but MyBatis does not provide a way to map POJOs and database tables. Grammatical verification, errors will be reported for illegal SQL, and the corresponding spring and other frameworks will collect these errors and convert them into java exceptions and throw them in the project, which is not conducive to the positioning and resolution of errors by R&D personnel

Method used

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

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method, device and system for intercepting dao layer verification sql based on springaop
  • Method, device and system for intercepting dao layer verification sql based on springaop
  • Method, device and system for intercepting dao layer verification sql based on springaop

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0047] The present invention will be further described in detail below in conjunction with the examples, the following examples are explanations of the present invention and the present invention is not limited to the following examples.

[0048] The present invention proposes a method based on SpringAop to intercept Dao layer requests to verify SQL to improve the interception and analysis of SQL exceptions. When the project reads and writes requests to the database, the database will perform syntax verification, and an error will be reported for illegal SQL. , the corresponding spring and other frameworks will collect these errors and then convert them into java exceptions and throw them in the project, which is not conducive to the positioning and resolution of errors by developers. Based on the above reasons, a technical implementation scheme based on SpringAop intercepting Dao layer request verification SQL is proposed to solve this problem.

[0049] By adopting the method...

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

PUM

No PUM Login to View More

Abstract

The invention discloses a method for intercepting DAO layer verification SQL based on SpringAop, comprising the following steps: responding to the action of project startup, loading database table information, parsing it into mapping information in a specific format and temporarily storing it in the project; using Spring's Aop technology, when the method name of the DAO layer is called, obtain its parameter information according to the method name, use the mapping information to verify the parameter information, and obtain the verification result. By adopting the method of the present invention, illegal SQL errors can be exposed in advance, and will not infiltrate into the database, but the abnormal information is collected at the code layer, and then a custom exception is thrown, or cached as an analysis basis; according to " In accordance with the principle of "agreement is better than configuration", in order to meet the user's own characteristics, it provides custom extended services, improves the efficiency of exception troubleshooting, and reduces the consumption of illegal SQL executed by the database when a large number of users request access.

Description

technical field [0001] The invention relates to the field of computer technology, in particular to a method, device and system for intercepting DAO layer verification SQL based on SpringAop. Background technique [0002] Since the database was born, the database has become an important part of the computer field. People store all kinds of data in the database, and store them in different content, different types or different formats. The reading and writing of the database has always been a very important aspect. Safe, reliable, and efficient reading and writing strategies can be used for the project. Provide data support. Whether it is many ORM frameworks or JDBC, in the end, the SQL statement is transmitted to the DB for execution, and then the result set is returned. Then we can verify the assembled SQL statement, and then enter the DB for execution after passing. [0003] The open source framework hibernate (object-relational mapping framework) is an open-source objec...

Claims

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

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F16/21
CPCG06F16/21
Inventor 曹阳王思发
Owner 政采云有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products