CN113010401A - SSM system-based exception capture processing method - Google Patents
SSM system-based exception capture processing method Download PDFInfo
- Publication number
- CN113010401A CN113010401A CN201911315235.9A CN201911315235A CN113010401A CN 113010401 A CN113010401 A CN 113010401A CN 201911315235 A CN201911315235 A CN 201911315235A CN 113010401 A CN113010401 A CN 113010401A
- Authority
- CN
- China
- Prior art keywords
- exception
- processing method
- ssm system
- abnormity
- custom
- 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.)
- Pending
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 15
- 238000000034 method Methods 0.000 claims abstract description 13
- 238000012795 verification Methods 0.000 claims 4
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000012423 maintenance Methods 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 239000012141 concentrate Substances 0.000 description 1
- 230000008878 coupling Effects 0.000 description 1
- 238000010168 coupling process Methods 0.000 description 1
- 238000005859 coupling reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses an exception capture processing method based on an SSM system, which comprises the following steps: adding an exception capture logic, adding a custom exception capture logic in aop, executing a controller method, uniformly intercepting the controller method in aop, judging the exception type through a check tool, throwing an exception, and performing exception handling; and if the abnormity is captured, returning a self-defined prompt to the front end according to the abnormity type. The invention is oriented to tangent plane programming for isolating and decoupling various points of interest. The non-invasive development is realized, the service redundant codes in the system are effectively reduced, and developers can be more concentrated on service logic.
Description
Technical Field
The invention relates to the technical field of software, in particular to an exception capture processing method based on an SSM system.
Background
AOP is an abbreviation for Aspect organized Programming, meaning: the method is a technique for realizing the unified maintenance of program functions by a pre-compiling mode and a running-period dynamic proxy. The AOP is a continuation of the OOP, is a hot spot in software development, is also an important content in a Spring framework, and is a derivative paradigm of functional programming. By utilizing the AOP, all parts of the business logic can be isolated, so that the coupling degree between all parts of the business logic is reduced, the reusability of a program is improved, and the development efficiency is improved.
At present, two common exception capture processing methods exist, namely, the exception is simply and roughly thrown to the front end, and the exception is processed in a service code. These methods can cause redundancy of a large number of repeated exception handling codes, so that developers need to pay attention to logic other than business, and in addition, the cost is increased by butting wrong information with the front end. Therefore, an exception capture processing method based on the SSM system is proposed.
Disclosure of Invention
Based on the technical problems in the background art, the invention provides an exception capture processing method based on an SSM system.
The invention provides an SSM system-based exception capture processing method, which comprises the following steps:
s1: adding exception capture logic, and adding logic for self-defining exception capture in aop;
s2: executing a controller method; a control controller intercepting method is unified in aop, the type of the abnormity is judged through a checking tool, and then the abnormity is thrown out;
s3: exception handling; and if the abnormity is captured, returning a self-defined prompt to the front end according to the abnormity type.
Preferably, the custom exception in S1 includes an alarmeexception.
Preferably, the custom exception in S1 further includes NoAuthException.
Preferably, the custom exception in S1 further includes CheckException.
Preferably, the custom exceptions are each inherited from a RuntimeException.
Preferably, the checking tool is a checkUtil tool, and logic checking is performed, wherein checkException is thrown if checking does not pass, authority checking is performed, NoAuthException is thrown if checking does not pass, important error checking is performed, and AlarmException is thrown if checking does not pass.
The beneficial effects of the invention are as follows:
1. the aop tangent plane technology is used, tangent plane programming is oriented, the method is used for isolating and decoupling all concerned points, non-invasive development is achieved, business redundancy codes in the system are effectively reduced, and developers can be more concentrated on business logic.
2. By classifying the exceptions by self-definition, the return of detailed and friendly front-end prompts is facilitated.
3. The non-intrusive abnormal interception processing scheme enables developers to concentrate on services, is beneficial to improving operation and maintenance cost and shortens development period.
Drawings
Fig. 1 is a schematic flow chart of an exception capture processing method based on an SSM system according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments.
Referring to fig. 1, an exception capture processing method based on an SSM system includes the following steps: adding exception capture logic, and adding logic for self-defining exception capture in aop; executing a controller method; a controller intercepting method is unified in aop, the types of the exceptions are judged, then different logic processing is carried out respectively, and then the exceptions are thrown out; exception handling; and if the abnormity is captured, returning a self-defined prompt to the front end according to the abnormity type, aop a section technology, and section-oriented programming for isolating and decoupling each focus of interest to realize non-invasive development.
In the invention, the custom exception comprises AlarmException, the custom exception also comprises NoAuthException, the custom exception also comprises CheckException, the custom exceptions inherit from RuntimeException, the checking tool is a CheckUtil tool, logic checking is carried out, CheckException can be thrown out if checking is not passed, authority checking is carried out, NoAuthException can be thrown out if checking is not passed, important error checking is carried out, AlarmException can be thrown out if checking is not passed.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art should be considered to be within the technical scope of the present invention, and the technical solutions and the inventive concepts thereof according to the present invention should be equivalent or changed within the scope of the present invention.
Claims (6)
1. An exception capture processing method based on an SSM system is characterized by comprising the following steps:
s1: adding exception capture logic, and adding logic for self-defining exception capture in aop;
s2: executing a controller method; a control controller intercepting method is unified in aop, the type of the abnormity is judged through a checking tool, and then the abnormity is thrown out;
s3: exception handling; and if the abnormity is captured, returning a self-defined prompt to the front end according to the abnormity type.
2. The SSM system-based exception handling method according to claim 1, wherein the custom exception in S1 includes an AlarmException.
3. The SSM system-based exception capture processing method of claim 2, wherein the custom exception in S1 further includes NoAuthException.
4. The SSM system-based exception capture processing method of claim 3, wherein the custom exception in S1 further includes a checkException.
5. The SSM system-based exception trap processing method as claimed in claim 4, wherein said custom exceptions are inherited from RuntimeException.
6. The SSM system-based exception capture processing method according to claim 5, wherein the verification tool is a checkUtil tool, and logical verification is performed, wherein checkException is not passed and is thrown, authority verification is performed, NoAuthException is not passed and is thrown, important error verification is performed, and AlarmException is not passed and is thrown.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911315235.9A CN113010401A (en) | 2019-12-19 | 2019-12-19 | SSM system-based exception capture processing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911315235.9A CN113010401A (en) | 2019-12-19 | 2019-12-19 | SSM system-based exception capture processing method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113010401A true CN113010401A (en) | 2021-06-22 |
Family
ID=76382660
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911315235.9A Pending CN113010401A (en) | 2019-12-19 | 2019-12-19 | SSM system-based exception capture processing method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113010401A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113704192A (en) * | 2021-08-04 | 2021-11-26 | 深圳市蜜蜂互联网络科技有限公司 | Log analysis method and device, computer equipment and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103488534A (en) * | 2013-09-23 | 2014-01-01 | 浪潮集团山东通用软件有限公司 | Method for enabling business logic layer to feed back control information to presentation layer |
CN104331367A (en) * | 2014-11-12 | 2015-02-04 | 浪潮(北京)电子信息产业有限公司 | Method and system for exception handling in Java engineering project development |
CN108345542A (en) * | 2018-02-28 | 2018-07-31 | 腾讯科技(深圳)有限公司 | Abnormality eliminating method and device in a kind of application program |
CN108762966A (en) * | 2018-06-05 | 2018-11-06 | 中国平安人寿保险股份有限公司 | System exception hold-up interception method, device, computer equipment and storage medium |
CN109522222A (en) * | 2018-10-26 | 2019-03-26 | 深圳点猫科技有限公司 | It is a kind of for educating the exception catching method and device of cloud platform |
CN110413269A (en) * | 2019-06-18 | 2019-11-05 | 深圳壹账通智能科技有限公司 | Interface coding method, server and computer readable storage medium |
-
2019
- 2019-12-19 CN CN201911315235.9A patent/CN113010401A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103488534A (en) * | 2013-09-23 | 2014-01-01 | 浪潮集团山东通用软件有限公司 | Method for enabling business logic layer to feed back control information to presentation layer |
CN104331367A (en) * | 2014-11-12 | 2015-02-04 | 浪潮(北京)电子信息产业有限公司 | Method and system for exception handling in Java engineering project development |
CN108345542A (en) * | 2018-02-28 | 2018-07-31 | 腾讯科技(深圳)有限公司 | Abnormality eliminating method and device in a kind of application program |
CN108762966A (en) * | 2018-06-05 | 2018-11-06 | 中国平安人寿保险股份有限公司 | System exception hold-up interception method, device, computer equipment and storage medium |
CN109522222A (en) * | 2018-10-26 | 2019-03-26 | 深圳点猫科技有限公司 | It is a kind of for educating the exception catching method and device of cloud platform |
CN110413269A (en) * | 2019-06-18 | 2019-11-05 | 深圳壹账通智能科技有限公司 | Interface coding method, server and computer readable storage medium |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113704192A (en) * | 2021-08-04 | 2021-11-26 | 深圳市蜜蜂互联网络科技有限公司 | Log analysis method and device, computer equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7975257B2 (en) | Iterative static and dynamic software analysis | |
CN104331367A (en) | Method and system for exception handling in Java engineering project development | |
US7607043B2 (en) | Analysis of mutually exclusive conflicts among redundant devices | |
US20160204992A1 (en) | Dynamic telemetry message profiling and adjustment | |
CN113010401A (en) | SSM system-based exception capture processing method | |
US8732522B2 (en) | System on chip fault detection | |
GB2455344A (en) | Recovering from errors in streaming dsp applications | |
CN112363710B (en) | Multi-variable user program compiling method based on multi-heterogeneous execution controller | |
US8392815B2 (en) | Method for the operation of a microcontroller and an execution unit and microcontroller and an execution unit | |
CN113994627B (en) | System for generating encrypted material | |
CN101763294A (en) | Method for looking up and backing up system operation log according to time slots | |
EP4091315B1 (en) | Techniques to provide streaming data resiliency utilizing a distributed message queue system | |
CN111090658A (en) | Abnormal transaction processing method, system and equipment | |
CN107273764B (en) | Security verification method of security protocol implemented by Swift language | |
US6697995B1 (en) | Diagnostic method for logic used in vehicle | |
KR101968544B1 (en) | Method and apparatus for detecting vulnerability of software | |
CN111404745B (en) | Connection method and terminal supporting interconnection of waveform and logic equipment | |
CN113986622A (en) | SDK abnormity self-checking method, device, medium and computing equipment | |
CN113806808A (en) | Non-invasive data desensitization method and system in distributed environment | |
CN111178996A (en) | Method and system for avoiding reopening bills | |
Wang et al. | Anomaly sequences detection from logs based on compression | |
US9164852B2 (en) | System on chip fault detection | |
US7251753B2 (en) | Apparatus, system, and method for identifying a faulty communication module | |
CN103138977B (en) | Intelligent network business on-line tracing system and method | |
CN110502209B (en) | Method for preventing random number generator from injection attack |
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 |