Dynamic extensible http request interface forwarding method and device
By dynamically loading external jar packets to process HTTP request and response data, the problem that traditional HTTP request forwarding methods are difficult to adapt to business changes is solved, flexible interface configuration and cache support is realized, and the stability and scalability of the system are improved.
Patent Information
- Application Number
- CN202411438607.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2025-01-14
AI Technical Summary
The traditional HTTP request forwarding method is difficult to adapt to rapidly changing business needs. Static configuration leads to high maintenance costs, lack of flexibility, and is difficult to dynamically expand, especially when it is necessary to perform encryption, decryption, data format conversion and other processing.
The pre-processor and post-processor are expanded by dynamically loading external jar packages to realize the pre-processing and post-processing of HTTP request and response data, supporting data encryption, decryption, parameter authentication, random parameter generation and data format Transformation, adopts an asynchronous recording mechanism, and enables cache according to cache control parameters, simplifying interface management and maintenance.
It realizes flexible configuration and dynamic expansion of HTTP request interfaces, adapts to changing business needs, improves system stability and scalability, reduces system maintenance costs and risks, and simplifies interface management.
Smart Images

Figure CN119316403A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of request forwarding, and in particular to a dynamically extensible HTTP request interface forwarding method and device. Background Art
[0002] In current Internet applications, the interaction between different systems and services is usually achieved through HTTP requests. As the scale of the system expands and the complexity of the business increases, the server needs to flexibly process and forward various HTTP requests. However, the traditional HTTP request forwarding method is usually statically configured and cannot adapt to rapidly changing business needs. When new forwarding requirements arise, the system often needs to be modified and redeployed, which increases maintenance costs and may cause system interruptions.
[0003] In addition, in some scenarios, HTTP requests need to undergo a series of processing before or after forwarding, such as encryption, decryption, adding random parameters, data format conversion, etc. The traditional method is usually to hard-code these processing logics in the code for each forwarding request, which lacks flexibility and is difficult to dynamically expand. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a dynamically scalable http request interface forwarding method and device to solve the problem that the existing request forwarding technology has poor flexibility and is difficult to dynamically expand.
[0005] The technical solution adopted by the present invention is: In a first aspect, the present invention provides a dynamically scalable http request interface forwarding method, comprising: Receive HTTP requests submitted by clients through access interfaces; Parse the HTTP request to obtain the target address, request method and request parameters; Dynamically load external jar packages to dynamically expand the preprocessor, and use the expanded preprocessor to pre-process the request parameters; Forward the pre-processed request parameters to the target HTTP interface according to the target address and request method; Get the response data of the target HTTP interface, dynamically load the external jar package to dynamically expand the post-processor, and use the post-processor to post-process the response data; Asynchronously record the post-processed response data, and forward the post-processed response data to the client after recording is completed.
[0006] Furthermore, the dynamically loading external jar package dynamically extends the preprocessor, and uses the extended preprocessor to pre-process the request parameters, including: The preprocessing logic in the preprocessor is dynamically expanded and configured by dynamically loading an external jar package to obtain a dynamically expanded preprocessor; A dynamically extended preprocessor is used to perform a preprocessing operation on the request parameters to obtain the preprocessed request parameters, wherein the preprocessing operation includes one or more of data encryption, parameter authentication and random parameter generation.
[0007] Further, forwarding the pre-processed request parameters to the target HTTP interface according to the target address and the request method includes: After the pre-processing is completed, determine whether the cache mechanism is enabled. If the cache mechanism is enabled, match the response data from the cache according to the request parameters after the pre-processing. If the corresponding response data is matched, the response data is forwarded directly to the client. If the corresponding response data is not matched or the cache mechanism is not enabled, the pre-processed request parameters are forwarded to the target HTTP interface according to the target address and request method.
[0008] Furthermore, the step of obtaining the response data of the target HTTP interface, dynamically loading the external jar package to dynamically expand the postprocessor, and post-processing the response data using the postprocessor includes: Acquire response data from the target HTTP interface, and acquire the postprocessor corresponding to the target HTTP interface. If the corresponding postprocessor is acquired, dynamically expand the postprocessing logic in the postprocessor by dynamically loading an external jar package to obtain an expanded postprocessor; perform postprocessing on the response data using the expanded postprocessor, wherein the postprocessing operation includes data decryption and data format conversion; If the post-processor is not obtained, the response data is processed according to the preset response data processing strategy.
[0009] Furthermore, after the post-processing and response processing are completed, it also includes: Determine whether the request parameters contain cache control parameters and cache time. If so, enable caching according to the cache control parameters and cache the processed response data according to the cache time. If there are no cache control parameters and cache time, the subsequent asynchronous record processing process will be entered.
[0010] Further, the asynchronously recording the post-processed response data, and forwarding the post-processed response data to the client after the recording is completed, includes: Recording information of the response data to be forwarded in an asynchronous recording manner and saving the recorded information to the library; the recorded information includes original request parameters, pre-processor information, post-processor information, response data and cache matching status; After the asynchronous recording is completed, the response data to be forwarded is forwarded to the client through the access interface.
[0011] Furthermore, the method of dynamically loading the external jar package is specifically as follows: Regularly scan the jar file directory of the file server to find new external jar files; Determine whether to force the loading of the jar package based on the loading parameters. If it is forced to load, calculate the MD5 values of all external jar packages, put the file MD5 values into the loaded map, and read and load the external jar package; If it is not forced loading, the MD5 value of the file of the last loaded jar package is obtained from the loaded map, and the loading parameters are used to determine whether it is necessary to detect jar package content changes; if content changes are not detected, only external jar packages that have not been loaded are scanned; If you need to detect content changes, compare the file MD5 value of the unloaded external jar package with the MD5 value of the loaded jar file. If the two are consistent, reload the external jar package. If the two are inconsistent, put the MD5 value of the external jar file with changed file content into the loaded map, and read and load the external jar package.
[0012] In a second aspect, the present invention further provides a dynamically scalable http request interface forwarding device, comprising: A request receiving module is used to receive HTTP requests submitted by the client through the access interface; The request parsing module is used to parse the HTTP request to obtain the target address, request method and request parameters; The pre-processing module is used to dynamically load external jar packages to dynamically expand the pre-processor, and use the expanded pre-processor to pre-process the request parameters; The request forwarding module is used to forward the pre-processed request parameters to the target HTTP interface according to the target address and request method; The post-processing module is used to obtain the response data of the target HTTP interface, dynamically load the external jar package to dynamically expand the post-processor, and use the post-processor to post-process the response data; The data forwarding module is used to asynchronously record the response data after post-processing, and forward the response data after post-processing to the client after recording is completed.
[0013] In summary, the beneficial effects of the present invention are as follows: The method for forwarding a dynamically extensible http request interface provided by the present invention receives the HTTP request submitted by the client through a unified access interface, thereby simplifying the interface management and maintenance. Then, the HTTP request is parsed to obtain the target address, request method and request parameters. Then, the external jar package is dynamically loaded to dynamically expand the preprocessor, and the request parameters are preprocessed by using the expanded preprocessor; the preprocessed request parameters are forwarded to the target HTTP interface according to the target address and request method; the response data of the target HTTP interface is obtained, and the external jar package is dynamically loaded to dynamically expand the postprocessor, and the response data is postprocessed by using the postprocessor. The present invention supports preprocessing and postprocessing of the forwarding interface, and also supports dynamic loading of external extensions for preprocessing and postprocessing, realizes flexible configuration of preprocessing and postprocessing, adapts to changing business needs, and improves the scalability of the request interface and the stability of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the technical solution of the embodiment of the present invention, the following is a brief introduction to the drawings required for use in the embodiment of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work, and these are all within the protection scope of the present invention.
[0015] Figure 1 A schematic diagram of a dynamically scalable HTTP request interface forwarding method of the present invention; Figure 2 The interface forwarding operation flow chart of the present invention; Figure 3 The automatic scanning and loading flow chart of the jar package of the present invention; Figure 4 Manual loading flow chart of the jar package of the present invention; Figure 5 This is the control flow chart of loading jar package of the present invention Figure 6 Load the sub-flow chart for the jar package of the present invention; Figure 7 This is a functional module structure diagram of the dynamically scalable http request interface forwarding device of the present invention. DETAILED DESCRIPTION
[0016] In order to make the purpose, technical solution and advantages of the embodiment of the present invention clearer, the technical solution in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. If there is no conflict, the various features of the present invention and the embodiments can be combined with each other, all within the scope of protection of the present invention.
[0017] Example 1: Reference Figure 1 and Figure 2 As shown, Figure 1 This is a flow chart of a method for quickly generating multi-format files based on a large database table of data in the present invention. Figure 2 This is the interface forwarding operation flow chart of the present invention. Figure 1 As shown, the method mainly includes the following steps: Receive HTTP requests submitted by clients through access interfaces; Parse the HTTP request to obtain the target address, request method and request parameters; Dynamically load external jar packages to dynamically expand the preprocessor, and use the expanded preprocessor to pre-process the request parameters; Forward the pre-processed request parameters to the target HTTP interface according to the target address and request method; Get the response data of the target HTTP interface, dynamically load the external jar package to dynamically expand the post-processor, and use the post-processor to post-process the response data; Asynchronously record the post-processed response data, and forward the post-processed response data to the client after recording is completed.
[0018] Specifically, the embodiment of the present invention provides a unified POST interface as the entry point for forwarding all HTTP requests. The client submits request data including target interface address, request method, request parameters and other information through this interface. After receiving the HTTP request sent by the client, the HTTP request is first parsed to obtain the request parameters, request method, target address and other information therein for use in the subsequent processing flow.
[0019] Furthermore, in the implementation of the present invention, the external jar package is dynamically loaded to dynamically expand the preprocessor, and the extended preprocessor is used to pre-process the request parameters, including: The preprocessing logic in the preprocessor is dynamically expanded and configured by dynamically loading an external jar package to obtain a dynamically expanded preprocessor; The dynamically extended preprocessor is used to perform preprocessing operations on the request parameters to obtain preprocessed request parameters. The preprocessing operations include one or more of data encryption, parameter authentication, and random parameter generation.
[0020] In the embodiment of the present invention, after receiving the HTTP request from the client, the pre-processing stage is entered. An attempt will be made to obtain the pre-processor of the forwarding interface. If a pre-processor exists, a pre-processing operation will be performed on the request parameters. The pre-processing module will perform a series of pre-processing operations on the request parameters, such as data encryption, authentication, random parameters, etc. The specific logic of the pre-processor supports expansion by dynamically loading external jar packages, which allows the processing logic to be flexibly adjusted according to business needs.
[0021] Furthermore, the embodiment of the present invention forwards the pre-processed request parameters to the target HTTP interface according to the target address and the request method, specifically including: After the pre-processing is completed, determine whether the cache mechanism is enabled. If the cache mechanism is enabled, match the response data from the cache according to the request parameters after the pre-processing. If the corresponding response data is matched, the response data is forwarded directly to the client. If the corresponding response data is not matched or the cache mechanism is not enabled, the pre-processed request parameters are forwarded to the target HTTP interface according to the target address and request method.
[0022] After the pre-processing is completed, the present invention determines whether the cache mechanism is enabled according to the cache control parameters carried in the request parameters. If the cache mechanism is enabled, it attempts to obtain the response data from the cache. If the data in the cache is hit, the response result is directly returned. If the cache does not hit the data, the request parameters are forwarded to the target interface to obtain the response data, and then the subsequent steps are performed.
[0023] like Figure 2 As shown, after the pre-processing is completed, the processed request parameters are forwarded to the specified HTTP interface according to the address of the target interface and the request method. In the embodiment of the present invention, the forwarding of request parameters supports multiple HTTP methods, including but not limited to GET, POST, PUT, DELETE, etc.
[0024] Further, in an embodiment of the present invention, the response data of the target HTTP interface is obtained, and the external jar package is dynamically loaded to dynamically expand the post-processor, and the response data is post-processed by the post-processor, which specifically includes: Acquire response data from the target HTTP interface, and acquire the postprocessor corresponding to the target HTTP interface. If the corresponding postprocessor is acquired, dynamically expand the postprocessing logic in the postprocessor by dynamically loading an external jar package to obtain an expanded postprocessor; perform postprocessing on the response data using the expanded postprocessor, wherein the postprocessing operation includes data decryption and data format conversion; If the post-processor is not obtained, the response data is processed according to the preset response data processing strategy.
[0025] Furthermore, after the post-processing and the response processing are completed, the embodiment of the present invention further includes: Determine whether the request parameters contain cache control parameters and cache time. If so, enable caching according to the cache control parameters and cache the processed response data according to the cache time. If there are no cache control parameters and cache time, the subsequent asynchronous record processing process will be entered.
[0026] Specifically, in the embodiment of the present invention, after the target HTTP interface returns a response, the system enters the post-processing stage, such as Figure 2 As shown. At this stage, first try to obtain the postprocessor of the forwarding interface (i.e., the target HTTP interface). If a postprocessor exists, the response result is post-processed. If no postprocessor exists, the response is processed according to the default response data processing strategy. The postprocessor further processes the returned data, such as data decryption and data format conversion. The logic of the postprocessor also supports expansion by dynamically loading external jar packages to ensure that the system can flexibly respond to different processing requirements.
[0027] After the post-processing is completed, the cache control parameters in the request parameters will be used to determine whether to enable the cache mechanism and cache the response results. If the cache mechanism is enabled, the response results will be cached according to the cache time. If the cache mechanism is not enabled, the subsequent processing steps will be entered. Among them, the incoming loading parameters include whether to detect changes and whether to force loading. Users can set not to detect changes but force loading.
[0028] In the embodiment of the present invention, when loading a jar package, the loading is usually performed by automatically scanning and obtaining loading parameters. Figure 3As shown, the process of automatically scanning and loading jar packages of the present invention is specifically as follows: obtaining the input parameters (i.e., loading parameters), and controlling the loading jar package according to the input parameters. For example, there are two scheduled tasks, one of which is executed every 10 seconds. When a new jar file is detected in the extension directory, the preprocessor and postprocessor inside the jar file will be loaded. The other task is executed every 5 minutes, and it will detect whether the content of the loaded jar file has changed. If a change occurs, it will be reloaded.
[0029] In addition, the embodiment of the present invention also supports manually loading all jar files in the file server directory in the dynamic extension management interface, and the already loaded ones will be reloaded. Figure 4 As shown, you can also manually select to load a jar package. When manually loading a jar package, you also first obtain the user input loading parameters. Among them, the loading parameters when manually loading a jar package are the same as those of the automatic scanning loading, which are whether to detect changes and whether to force loading.
[0030] Furthermore, in an embodiment of the present invention, asynchronously recording the response data after post-processing, and forwarding the response data after post-processing to the client after recording is completed, specifically includes: Recording information of the response data to be forwarded in an asynchronous recording manner and saving the recorded information to the library; the recorded information includes original request parameters, pre-processor information, post-processor information, response data and cache matching status; After the asynchronous recording is completed, the response data to be forwarded is forwarded to the client through the access interface.
[0031] Specifically, in the embodiment of the present invention, before returning the response data, the forwarded response result will be asynchronously recorded to the database. The recorded information includes: original request parameters, preprocessor information involved in the processing, postprocessor information involved in the processing, response data, and whether it hits the cache (i.e., cache match status).
[0032] Furthermore, in the embodiment of the present invention, a visual monitoring interface is provided to monitor all the processes of request forwarding. In the visual monitoring interface, users can view the request records through the interface and understand the various links and status of the request processing, including request parameters, response results, pre-processors, post-processors, and whether the cache is hit, which makes troubleshooting and debugging more intuitive and efficient.
[0033] Further, refer to Figure 5 The control flow of loading jar packages shown in the figure is as follows: Get the loading parameters and obtain the list of all jar files in the extend directory of the file server. If there are jar files, scan the jar file directory of the file server regularly to find new external jar files. When the corresponding jar file is obtained, it is determined whether to force the jar package to be loaded according to the loading parameters. If it is forced to be loaded, the MD5 values of all external jar packages are calculated, and the file MD5 values are placed in the loaded map, and the external jar package is read and loaded, and the jar package loading sub-process is entered; If it is not forced loading, the MD5 value of the file of the last loaded jar package is obtained from the loaded map, and the loading parameters are used to determine whether it is necessary to detect jar package content changes; if content changes are not detected, only external jar packages that have not been loaded are scanned; If you need to detect content changes, compare the file MD5 value of the unloaded external jar package with the MD5 value of the loaded jar file. If the two are consistent, reload the external jar package. If the two are inconsistent, put the MD5 value of the external jar file with changed file content into the loaded map, read and load the external jar package, and enter the jar package loading sub-process.
[0034] Among them, refer to Figure 6 As shown in the figure, the sub-process of loading the jar package specifically includes: reading and parsing the jar package, loading all classes and files in the jar package. Then scan and obtain the class of the container type, parse the dependencies of the container type class, and sort them. Then obtain the bean object from the container according to the fully qualified class name of the bean. If the bean object exists, remove the bean object. If the bean object does not exist, further determine whether the container contains special annotations. If it contains special annotations, process the special annotations, register the beans in the container, and complete the loading of the jar package. If it does not contain special annotations, directly register the beans in the container.
[0035] The embodiments of the present invention have the following technical features: 1. Unified interface management: All HTTP request forwarding requirements are handled through a unified entrance, simplifying interface management and maintenance.
[0036] 2. Pre-processing and post-processing: Support pre-processing and post-processing of forwarding interfaces.
[0037] 3. Cache support: Dynamically enable and disable interface forwarding cache based on forwarding request parameters. This mechanism not only improves system performance, but also reduces the load on the target server and effectively reduces network latency.
[0038] 4. Flexible dynamic configuration: Supports dynamic loading of external extensions to achieve flexible configuration of pre-processing and post-processing to adapt to changing business needs.
[0039] 5. Reduce system maintenance costs: Through dynamic expansion and configuration, the number of code modifications and service restarts is reduced, thereby reducing system maintenance costs and risks.
[0040] 6. Visual monitoring and management interface: Provides visual forwarding record query, compilation problem analysis and debugging. Provides an integrated management interface through which users can manage dynamic expansion packages.
[0041] Example 2: Reference Figure 7 As shown, the present invention also provides a dynamically scalable http request interface forwarding device, comprising: A request receiving module is used to receive HTTP requests submitted by the client through the access interface; The request parsing module is used to parse the HTTP request to obtain the target address, request method and request parameters; The pre-processing module is used to dynamically load external jar packages to dynamically expand the pre-processor, and use the expanded pre-processor to pre-process the request parameters; The request forwarding module is used to forward the pre-processed request parameters to the target HTTP interface according to the target address and request method; The post-processing module is used to obtain the response data of the target HTTP interface, dynamically load the external jar package to dynamically expand the post-processor, and use the post-processor to post-process the response data; The data forwarding module is used to asynchronously record the response data after post-processing, and forward the response data after post-processing to the client after recording is completed.
[0042] In the embodiment of the present invention, the external jar package is dynamically loaded, and the logic of the pre-processor and post-processor therein is applied in real time. The specific steps are as follows: 1) Scan the file server jar package directory: The system will first scan the specified directory to find new external jar packages. This directory is usually a predefined path for storing all jar files that need to be dynamically loaded.
[0043] 2) Determine whether to force loading based on the input parameters: If forced loading, all jars will be read and loaded.
[0044] 3) Determine whether to detect jar content changes based on the input parameters: If content changes are not detected, only jar files that have not been loaded will be scanned. If content changes need to be detected, in addition to jar files that have not been loaded, the contents of loaded jar files will also be compared, and only those with changed contents will be loaded.
[0045] 4) Loading jar package: When a new jar package is detected, the system will load the jar package and register the preprocessor and postprocessor classes defined in it into the system container.
[0046] 5) Real-time effect: All newly loaded processors take effect immediately after registration, without restarting the system. This ensures system scalability.
[0047] The extended pre-processor and post-processor support obtaining configuration from the configuration center and can be updated dynamically.
[0048] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A dynamically scalable http request interface forwarding method, characterized in that: include: Receive HTTP requests submitted by clients through access interfaces; Parse the HTTP request to obtain the target address, request method and request parameters; Dynamically load external jar packages to dynamically expand the preprocessor, and use the expanded preprocessor to pre-process the request parameters; Forward the pre-processed request parameters to the target HTTP interface according to the target address and request method; Get the response data of the target HTTP interface, dynamically load the external jar package to dynamically expand the post-processor, and use the post-processor to post-process the response data; Asynchronously record the post-processed response data, and forward the post-processed response data to the client after recording is completed.
2. The dynamically scalable http request interface forwarding method according to claim 1, characterized in that: The dynamically loading external jar package dynamically extends the preprocessor, and uses the extended preprocessor to pre-process the request parameters, including: The preprocessing logic in the preprocessor is dynamically expanded and configured by dynamically loading an external jar package to obtain a dynamically expanded preprocessor; A dynamically extended preprocessor is used to perform a preprocessing operation on the request parameters to obtain the preprocessed request parameters, wherein the preprocessing operation includes one or more of data encryption, parameter authentication and random parameter generation.
3. The dynamically scalable http request interface forwarding method according to claim 1, characterized in that: The method of forwarding the pre-processed request parameters to the target HTTP interface according to the target address and the request method includes: After the pre-processing is completed, determine whether the cache mechanism is enabled. If the cache mechanism is enabled, match the response data from the cache according to the request parameters after the pre-processing. If the corresponding response data is matched, the response data is forwarded directly to the client. If the corresponding response data is not matched or the cache mechanism is not enabled, the pre-processed request parameters are forwarded to the target HTTP interface according to the target address and request method.
4. The dynamically scalable http request interface forwarding method according to claim 1, characterized in that: The step of obtaining the response data of the target HTTP interface, dynamically loading the external jar package to dynamically expand the postprocessor, and post-processing the response data using the postprocessor includes: Acquire response data from the target HTTP interface, and acquire the postprocessor corresponding to the target HTTP interface. If the corresponding postprocessor is acquired, dynamically expand the postprocessing logic in the postprocessor by dynamically loading an external jar package to obtain an expanded postprocessor; perform postprocessing on the response data using the expanded postprocessor, wherein the postprocessing operation includes data decryption and data format conversion; If the post-processor is not obtained, the response data is processed according to the preset response data processing strategy.
5. The dynamically scalable http request interface forwarding method according to claim 4, characterized in that: After post-processing and response processing are completed, it also includes: Determine whether the request parameters contain cache control parameters and cache time. If so, enable caching according to the cache control parameters and cache the processed response data according to the cache time. If there are no cache control parameters and cache time, the subsequent asynchronous record processing process will be entered.
6. The dynamically scalable http request interface forwarding method according to claim 1, characterized in that: The asynchronous recording of the post-processed response data and forwarding the post-processed response data to the client after the recording is completed include: Recording information of the response data to be forwarded in an asynchronous recording manner and saving the recorded information to the library; the recorded information includes original request parameters, pre-processor information, post-processor information, response data and cache matching status; After the asynchronous recording is completed, the response data to be forwarded is forwarded to the client through the access interface.
7. The dynamically scalable http request interface forwarding method according to claim 2 or 4, characterized in that: The method of dynamically loading external jar packages is as follows: Regularly scan the jar file directory of the file server to find new external jar files; Determine whether to force the loading of the jar package based on the loading parameters. If it is forced to load, calculate the MD5 values of all external jar packages, put the file MD5 values into the loaded map, and read and load the external jar package; If it is not forced loading, the MD5 value of the file of the last loaded jar package is obtained from the loaded map, and the loading parameters are used to determine whether it is necessary to detect jar package content changes; if content changes are not detected, only external jar packages that have not been loaded are scanned; If you need to detect content changes, compare the file MD5 value of the unloaded external jar package with the MD5 value of the loaded jar file. If the two are consistent, reload the external jar package. If the two are inconsistent, put the MD5 value of the external jar file with changed file content into the loaded map, and read and load the external jar package.
8. A dynamically scalable http request interface forwarding device, characterized in that: include: A request receiving module is used to receive HTTP requests submitted by the client through the access interface; The request parsing module is used to parse the HTTP request to obtain the target address, request method and request parameters; The pre-processing module is used to dynamically load external jar packages to dynamically expand the pre-processor, and use the expanded pre-processor to pre-process the request parameters; The request forwarding module is used to forward the pre-processed request parameters to the target HTTP interface according to the target address and request method; The post-processing module is used to obtain the response data of the target HTTP interface, dynamically load the external jar package to dynamically expand the post-processor, and use the post-processor to post-process the response data; The data forwarding module is used to asynchronously record the response data after post-processing, and forward the response data after post-processing to the client after recording is completed.