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

Spring remote call-based exception handling method and system

An exception handling and remote calling technology, applied in the field of microservices, can solve problems such as bloated and complex business code, and long exception handling process

Pending Publication Date: 2022-06-03
杭州每刻科技有限公司
View PDF0 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] At present, in the micro-server architecture, with the increase of business, the developers of each project will define exceptions in their own development business, and convert the definition exceptions into remote service exceptions after capture. However, different developers in the above projects When dealing with different businesses, they will customize their business exceptions and at the same time need to trycatch their business exceptions and then convert them into remote service exceptions. At the same time, the client needs to capture their remote service exceptions and convert them into business exceptions. Because the exception handling process is relatively long and complicated, it will lead to The negligence of some developers will also lead to bloated business code

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
  • Spring remote call-based exception handling method and system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0023] The following description serves to disclose the invention to enable those skilled in the art to practice the invention. The preferred embodiments described below are given by way of example only, and other obvious modifications will occur to those skilled in the art. The basic principles of the invention defined in the following description may be applied to other embodiments, variations, improvements, equivalents, and other technical solutions without departing from the spirit and scope of the invention.

[0024] It should be understood that the term "a" should be understood as "at least one" or "one or more", that is, in one embodiment, the number of an element may be one, while in another embodiment, the number of the element may be one. The number may be plural, and the term "one" should not be understood as a limitation on the number.

[0025] Please refer to the figure, the present invention discloses an exception handling method and system based on Spring remot...

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 an exception handling method and system based on Spring remote calling, and the method comprises the steps: constructing a server exception processor, and defining a server exception handling base class and related business parameters; constructing an interception annotation in the server exception processor, generating a remote service interceptor, and intercepting business data through the remote service interceptor; judging whether business data intercepted by a remote service interceptor is abnormal business data or not according to the server exception handling base class; constructing a client exception processor, and defining a client exception processing base class and an annotation; generating a Spring agent according to the client exception handling annotation, and intercepting a client execution method through the Spring agent; and calling the client exception processor and the client exception handling base class to perform exception judgment and handling on the intercepted client execution method.

Description

technical field [0001] The invention relates to the technical field of microservices, in particular to an exception handling method and system based on Spring remote invocation. Background technique [0002] At present, in the micro-server architecture, with the increase of business, the developers of each project will define exceptions in their own development business, and convert the defined exceptions into remote service exceptions after capturing them. However, different developers in the above projects are in the When dealing with different businesses, it will customize its business exceptions, and at the same time need to trycatch its business exceptions and then convert them into remote service exceptions. At the same time, the client needs to capture its remote service exceptions and convert them into business exceptions. Because the exception handling process is relatively long and complex, it will lead to The negligence of some developers can also lead to bloated ...

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 Applications(China)
IPC IPC(8): G06F9/4401
CPCG06F9/4416
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