CN115268401A - Calling method and device of controller method instance, storage medium and server - Google Patents
Calling method and device of controller method instance, storage medium and server Download PDFInfo
- Publication number
- CN115268401A CN115268401A CN202210892731.6A CN202210892731A CN115268401A CN 115268401 A CN115268401 A CN 115268401A CN 202210892731 A CN202210892731 A CN 202210892731A CN 115268401 A CN115268401 A CN 115268401A
- Authority
- CN
- China
- Prior art keywords
- value
- mapping table
- controller method
- variable
- method instance
- 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
Images
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B23/00—Testing or monitoring of control systems or parts thereof
- G05B23/02—Electric testing or monitoring
- G05B23/0205—Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
- G05B23/0218—Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterised by the fault detection method dealing with either existing or incipient faults
- G05B23/0221—Preprocessing measurements, e.g. data collection rate adjustment; Standardization of measurements; Time series or signal analysis, e.g. frequency analysis or wavelets; Trustworthiness of measurements; Indexes therefor; Measurements using easily measured parameters to estimate parameters difficult to measure; Virtual sensor creation; De-noising; Sensor fusion; Unconventional preprocessing inherently present in specific fault detection methods like PCA-based methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2228—Indexing structures
- G06F16/2255—Hash tables
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2282—Tablespace storage structures; Management thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/25—Integrating or interfacing systems involving database management systems
Abstract
The embodiment of the application discloses a calling method, a calling device, a storage medium and a server of a controller method instance, and relates to the field of internet. When the controller method instance is called, when an interface access request with a variable is received, the controller method instance can be firstly inquired in a variable mapping table, mapping relation information inquired in a native mapping table in advance is cached in the variable mapping table, if a query result is obtained in the variable mapping table, the corresponding controller method instance is directly called, the speed and the efficiency of searching the controller method instance are greatly improved, the condition that the query is carried out in the native mapping table every time is avoided, and the time complexity is reduced from O (n) to O (1).
Description
Technical Field
The present application relates to the field of internet, and in particular, to a method, an apparatus, a storage medium, and a server for invoking a controller method instance.
Background
In the development process of WEB application, whether newly developed module codes conform to restful style interface specifications or servlets in old module codes process migration, a large number of interface access requests with variables exist. Due to the variable in the interface access request, the processing performance of the native Spring MVC architecture on the interface access request is very low, and the required controller method instance handlemethod can be found only by traversing in a native mapping table with tens of thousands of elements, so that the response time of the Spring MVC architecture is greatly increased, and in a performance test, the response time is about 100 milliseconds, so that the user experience is seriously responded.
Disclosure of Invention
The embodiment of the application provides a calling method, a calling device, a storage medium and a server of a controller method instance, and can solve the problem that the response speed of calling the controller method instance is low in the prior art. The technical scheme is as follows:
in a first aspect, an embodiment of the present application provides a method for invoking a controller method instance, where the method includes:
receiving an interface access request; the interface access request carries a path parameter and a value of the path parameter;
identifying the value type of the value of the path parameter;
if the value type is a variable, inquiring in a variable mapping table according to the value of the path parameter;
if the controller method instance corresponding to the path parameter value is inquired, calling the inquired controller method instance;
if the controller method instance corresponding to the path parameter value is not inquired, traversing in a native mapping table according to the interface access request, acquiring the traversed controller method instance value in the native mapping table, calling the traversed controller method instance, mapping the traversed controller method instance ID and the traversed path parameter value of the controller method instance to generate mapping relation information, and writing the generated mapping relation information into the variable mapping table.
In a second aspect, an embodiment of the present application provides an apparatus for invoking a controller method instance, where the apparatus includes:
the receiving and sending unit is used for receiving an interface access request; the interface access request carries a path parameter and a value of the path parameter;
the identification unit is used for identifying the value type of the value of the path parameter;
the query unit is used for querying in a variable mapping table according to the value of the path parameter if the value type is a variable;
the calling unit is used for calling the inquired controller method instance if the controller method instance corresponding to the value of the path parameter is inquired;
and the writing unit is used for traversing in a native mapping table according to the interface access request if the controller method instance corresponding to the path parameter value is not inquired, acquiring the traversed controller method instance value in the native mapping table, calling the traversed controller method instance, mapping the traversed controller method instance ID and the traversed controller method instance path parameter value to generate mapping relation information, and writing the generated mapping relation information into the variable mapping table.
In a third aspect, embodiments of the present application provide a computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the above-mentioned method steps.
In a fourth aspect, an embodiment of the present application provides a server, which may include: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the above-mentioned method steps.
The beneficial effects brought by the technical scheme provided by some embodiments of the application at least comprise:
according to the embodiment of the application, when the controller method instance is called and an interface access request with a variable is received, the controller method instance can be firstly inquired in the variable mapping table, mapping relation information inquired in the native mapping table in advance is cached in the variable mapping table, if a query result is obtained in the variable mapping table, the corresponding controller method instance is directly called, the speed and the efficiency of searching the controller method instance are greatly improved, the condition that the query is carried out in the native mapping table every time is avoided, and the time complexity is reduced from O (n) to O (1). If the query result is not obtained in the variable mapping table, traversing is performed in the native mapping table to obtain a traversal result, the traversed mapping relation information is cached in the constant mapping table, and the query result can be directly obtained by querying in the variable mapping table when an interface access request is received next time.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic diagram of a network architecture provided in an embodiment of the present application;
FIG. 2 is a flowchart illustrating a method for invoking an example controller method according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a calling device of an example controller method provided in the present application;
fig. 4 is a schematic structural diagram of a server provided in the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
It should be noted that, the calling method of the controller method example provided in the present application is generally executed by a server, and accordingly, the calling device of the controller method example is generally disposed in the server.
FIG. 1 illustrates an exemplary system architecture of a calling method or calling means of a controller method instance that may be applied to the controller method instance of the present application.
As shown in fig. 1, the system architecture may include: a computer device 101 and a server 102. Communication between computer device 101 and server 102 may be via a network, which is the medium used to provide the communication links between the various elements described above. The network may include various types of wired or wireless communication links, such as: the wired communication link includes an optical fiber, a twisted pair wire, or a coaxial cable, etc., and the WIreless communication link includes a bluetooth communication link, a WIreless-FIdelity (Wi-Fi) communication link, or a microwave communication link, etc.
The server 102 is provided with a Spring MVC framework, the Spring MVC framework is a lightweight WEB framework based on Java and capable of realizing a request driving type of an MVC design mode, a WEB layer is decoupled in responsibility by separating a Model, a View and a Controller, a complex WEB application is divided into parts with clear logic, development is simplified, errors are reduced, and cooperation among development personnel is facilitated.
It should be noted that the computer device 101 and the server 102 may be hardware or software. When the computer device 101 and the server 102 are hardware, they may be implemented as a distributed server cluster composed of a plurality of servers, or may be implemented as a single server. When the computer device 101 and the server 102 are software, they may be implemented as a plurality of software or software modules (for example, to provide distributed services), or may be implemented as a single software or software module, and are not limited in this regard.
Various communication client applications may be installed on the computer device of the present application, for example: video recording application, video playing application, voice interaction application, search application, instant messaging tool, mailbox client, social platform software, etc.
The computer device may be hardware or software. When the computer device is hardware, it can be various computer devices with a display screen, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like. When the computer device is software, the above listed computer devices may be installed. Which may be implemented as a plurality of software or software modules (e.g., to provide distributed services) or as a single software or software module, and is not specifically limited herein.
When the computer equipment is hardware, the computer equipment can also be provided with display equipment and a camera, the display equipment can display various equipment capable of realizing the display function, and the camera is used for collecting video streams; for example: the display device may be a cathode ray tube (CR) display, a light-emitting diode (LED) display, an electronic ink screen, a Liquid Crystal Display (LCD), a Plasma Display Panel (PDP), or the like. The user can utilize the display device on the computer device to view the displayed information such as characters, pictures, videos and the like.
It should be understood that the number of computer devices, networks, and servers in fig. 1 is illustrative only. Any number of computer devices, networks, and servers are possible, as desired for an implementation.
The following describes in detail a method for invoking an example of a controller method provided in an embodiment of the present application with reference to fig. 2. The calling device of the controller method example in the embodiment of the present application may be the server shown in fig. 1.
Referring to fig. 2, a flowchart of a method for calling a controller method instance is provided in an embodiment of the present application. As shown in fig. 2, the method of the embodiment of the present application may include the steps of:
s201, receiving an interface access request.
In the embodiment of the application, a user sends an interface access request to a server through a browser of a terminal device, where the interface access request is used for a controller method instance handler method, and a Spring MVC architecture deployed in the server and provided with multiple controller method instances. The interface access request carries a path parameter and a value of the path parameter, and the value of the path parameter represents an index of a controller method instance.
For example: the user-initiated interface access request is represented as: the path parameter represented by org in/reset/{ callname }/{ methodname },/org/{ i },/user/{ i }, org/{ i }, is an organization identifier, and i in parenthesis represents the value of the corresponding organization identifier; the path parameter represented by the user/{ i } is the user identifier, and the i in the brace represents the value of the user identifier. callname represents the value of the calling name, and methodname represents the value of the name of the controller method instance.
And S202, identifying the value type of the path parameter.
In this embodiment, the value type includes a constant and a variable, where the constant, that is, the path value, is a determined value, and the variable indicates that the path value is an indeterminate value. For example: according to the example in S201, if the user identifier takes the value i, and i is an uncertain value, the value type of the path parameter is a variable. If the value of the user identifier is expressed as user/{10}, obviously, the value type of the path parameter is constant.
And S203, if the value type is a variable, inquiring in a variable mapping table according to the value of the path parameter.
In this embodiment of the application, if the value type is determined to be a variable according to the identification result of S202, query is performed in a preset variable mapping table according to the value of the path, mapping relationship information indicating a mapping relationship between the value of the path parameter and the ID of the controller method entity is cached in the variable mapping table, multiple pieces of mapping relationship information may be stored in the variable mapping table, the value is modified from a variable to a constant according to the numerical range of the path parameter, and then query is performed in the variable mapping table based on the modified value of the path parameter. The variable mapping table is an extended mapping table in an existing Spring MVC framework, and a self-contained mapping table in the Spring MVC framework in the native mapping table, for example: the native mapping table is RequestMappingHandlerMapping, and the variable mapping table is VariablePathHandlerMapping.
For example: the 2 pieces of mapping relationship information stored in the variable mapping table are represented as: according to the numerical range of the path parameter, the value of user/{ i } of the path parameter is modified to be constant user/{1}, and then query is carried out in a variable mapping table based on the user/{1}, and the result can be queried only once. Further, the variable mapping table is a hash mapping table, and the modified path parameter is queried in the hash mapping table according to the value, and the complexity is O (1).
And S204, if the controller method instance corresponding to the value of the path parameter is inquired, calling the inquired controller method instance.
In the embodiment of the application, if the ID of the controller method instance associated with the value of the path parameter is inquired in the variable mapping table, the controller method instance is called, and then the response data of the controller method instance is returned to the user.
S205, if the controller method instance corresponding to the path parameter value is not inquired, traversing in the native mapping table according to the interface access request, obtaining the traversed controller method instance value in the native mapping table, calling the traversed controller method instance, mapping the traversed controller method instance ID and the traversed controller method instance value to generate mapping relation information, and writing the generated mapping relation information into the variable mapping table.
In the embodiment of the application, if the interface access request is the first access, the query result cannot be obtained in the variable mapping table, and at this time, traversal is performed in the native mapping table according to the values of other parameters in the interface access request, and the mapping relationship between the ID of the controller method instance and the value of the specified parameter is stored in the native mapping table. The native mapping table typically holds a number of elements, and assuming the number is n, the time complexity of traversal is O (n).
Further, the interface access request also carries a value of a calling name and a value of a controller method instance name, for example: in the example of S201, callname represents a value of the calling name, and methodname represents a value of the name of the controller method instance, and traversal is performed in the native mapping table according to the value, and since complete mapping relationship information is stored in the native mapping table, a traversal result can always be obtained finally.
In the embodiment of the application, the ID of the controller method instance traversed in the native mapping table and the value of the traversed controller method instance are mapped to generate mapping relation information, and the generated mapping relation information is written into the variable mapping table, so that when an interface access request is received again, a query result can be directly queried in the variable mapping table, the time complexity is reduced from O (n) to O (1), the efficiency of searching the controller method instance is greatly improved, and the response speed is improved.
In the embodiment of the present application, if the value of the path parameter in S201 is a constant, the query is performed in the native mapping table based on the existing traversal method, which is not described herein again, and the time complexity is O (1). Furthermore, the native mapping table is a hash mapping table, so that query is performed in the native mapping table based on a hash algorithm, and query speed and efficiency can be improved.
In this embodiment of the present application, the writing the generated mapping relationship information into the variable mapping table includes:
judging whether the size of the residual space in the mapping relation table is larger than a space threshold value or not;
if so, writing the generated mapping relation information into the variable relation table;
if not, deleting the mapping relation information with the longest unused time in the variable mapping table, and writing the generated mapping relation information into the variable mapping table after deletion.
The mapping relationship table may be provided with a plurality of storage units with equal size, each storage unit stores one piece of mapping relationship information, when the number of storage units in an idle state in the mapping relationship table is less than a number threshold, it indicates that the remaining space of the mapping relationship table is insufficient, and the space threshold is determined by the number threshold, for example: each storage unit is 1 byte in size, the number threshold is 4, and then the space threshold is 4 bytes, and the size of the space threshold can be adjusted according to actual needs, and is not limited herein. If the residual space is larger than the space threshold, directly writing the generated mapping relation information into the native mapping table; if the residual space is not larger than the space threshold, counting unused time of each mapping relation information in the native mapping table, wherein the unused time represents the time length between the current time and the last used time, deleting the mapping relation information with the maximum unused time, and then writing the generated mapping relation information, so that the space utilization rate of the native mapping table can be improved under the condition of ensuring the hit rate.
In the embodiment of the application, the variable mapping table is deployed in a framework layer of a Spring MVC framework, the interface access request is from a service layer of the Spring MVC, namely, only the code of the framework layer is modified, the service layer is unaware when the controller method instance in the framework layer is called based on the interface access request, the code of the service layer does not need to be modified, the existing service logic is not damaged, and the workload of subsequent maintenance and development is reduced.
According to the embodiment of the application, when the controller method instance is called and an interface access request with a variable is received, the controller method instance can be firstly inquired in the variable mapping table, mapping relation information inquired in the native mapping table in advance is cached in the variable mapping table, if a query result is obtained in the variable mapping table, the corresponding controller method instance is directly called, the speed and the efficiency of searching the controller method instance are greatly improved, the condition that the query is carried out in the native mapping table every time is avoided, and the time complexity is reduced from O (n) to O (1). If the query result is not obtained in the variable mapping table, traversing is carried out in the original mapping table to obtain a traversal result, the traversed mapping relation information is cached in the constant mapping table, and the query result can be directly obtained by querying in the variable mapping table when an interface access request is received next time.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Referring to fig. 3, a schematic structural diagram of a calling device of an example of a controller method provided in an exemplary embodiment of the present application is shown, which is hereinafter referred to as device 3. The apparatus 3 may be implemented as all or part of a server by software, hardware or a combination of both. The device 3 comprises: a transceiving unit 301, an identification unit 302, an inquiry unit 303, a calling unit 304, and a writing unit 305.
A transceiving unit 301, configured to receive an interface access request; the interface access request carries a path parameter and a value of the path parameter;
an identifying unit 302, configured to identify a value type of a value of the path parameter;
the query unit is used for querying in a variable mapping table according to the value of the path parameter if the value type is a variable;
a calling unit 303, configured to call the queried controller method instance if the controller method instance corresponding to the value of the path parameter is queried;
a writing unit 304, configured to traverse in a native mapping table according to the interface access request if a controller method instance corresponding to the value of the path parameter is not queried, obtain the value of the traversed controller method instance in the native mapping table, call the traversed controller method instance, map the ID of the traversed controller method instance and the value of the path parameter of the traversed controller method instance, generate mapping relationship information, and write the generated mapping relationship information in the variable mapping table.
In one or more possible embodiments, the invoking unit 303 is further configured to:
and if the value type is a constant, traversing in the native mapping table according to the access path request, and calling the traversed controller method instance.
In one or more possible embodiments, the interface access request further carries a value of a calling name and a value of a controller method instance name; and traversing the controller method instance in the native mapping table according to the value of the calling name and the value of the controller method instance name.
In one or more possible embodiments, the writing the generated mapping relationship information into the variable mapping table includes:
judging whether the size of the residual space in the mapping relation table is larger than a space threshold value or not;
if so, writing the generated mapping relation information into the variable relation table;
if not, deleting the mapping relation information with the longest unused time in the variable mapping table, and writing the generated mapping relation information into the variable mapping table after deletion.
In one or more possible embodiments, the variable mapping table and the native mapping table are hash mapping tables.
In one or more possible embodiments, the variable mapping table is deployed at a framework layer of a Spring MVC architecture, and the interface access request is from a service layer of the Spring MVC.
In one or more possible embodiments, the path parameters include a user identification and/or an organization identification.
It should be noted that, when the apparatus 3 provided in the above embodiment executes the calling method of the controller method instance, only the division of the above function modules is taken as an example, and in practical applications, the above function distribution may be completed by different function modules according to needs, that is, the internal structure of the device is divided into different function modules to complete all or part of the above functions. In addition, the calling device of the controller method example and the calling method embodiment of the controller method example provided in the above embodiments belong to the same concept, and details of the implementation process are shown in the method embodiments, which are not described herein again.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
An embodiment of the present application further provides a computer storage medium, where the computer storage medium may store a plurality of instructions, where the instructions are suitable for being loaded by a processor and executing the method steps in the embodiment shown in fig. 2, and a specific execution process may refer to a specific description of the embodiment shown in fig. 2, which is not described herein again.
The present application further provides a computer program product storing at least one instruction, which is loaded and executed by the processor to implement the calling method of the controller method instance according to the above embodiments.
Please refer to fig. 4, which provides a schematic structural diagram of a server according to an embodiment of the present application. As shown in fig. 4, the server 400 may include: at least one processor 401, at least one network interface 404, memory 405, at least one communication bus 402.
Wherein a communication bus 402 is used to enable connective communication between these components.
Optionally, the server 400 further includes: the user interface 403, the user interface 403 may include a Display screen (Display), a Camera (Camera), and the user interface 403 may also include a standard wired interface, a wireless interface.
The network interface 404 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), among others.
The Memory 405 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 405 includes a non-transitory computer-readable medium. The memory 405 may be used to store instructions, programs, code sets, or instruction sets. The memory 405 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described above, and the like; the storage data area may store data and the like referred to in the above respective method embodiments. The memory 405 may alternatively be at least one storage device located remotely from the aforementioned processor 401. As shown in fig. 4, the memory 405, which is a type of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and an application program.
In the server 400 shown in fig. 4, the user interface 403 is mainly used as an interface for providing input for a user, and acquiring data input by the user; the processor 401 may be configured to call the application program stored in the memory 405 and specifically execute the method shown in fig. 2, and the specific process may refer to fig. 2 and is not described herein again.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium can be a magnetic disk, an optical disk, a read-only memory or a random access memory.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present application and should not be taken as limiting the scope of the present application, so that the present application will be covered by the appended claims.
Claims (10)
1. A method for invoking a controller method instance, comprising:
receiving an interface access request; the interface access request carries a path parameter and a value of the path parameter;
identifying the value type of the value of the path parameter;
if the value type is variable, inquiring in a variable mapping table according to the value of the path parameter;
if the controller method instance corresponding to the path parameter value is inquired, calling the inquired controller method instance;
if the controller method instance corresponding to the path parameter value is not inquired, traversing in a native mapping table according to the interface access request, acquiring the traversed controller method instance value in the native mapping table, calling the traversed controller method instance, mapping the traversed controller method instance ID and the traversed path parameter value of the controller method instance to generate mapping relation information, and writing the generated mapping relation information into the variable mapping table.
2. The method of claim 1, further comprising:
and if the value type is a constant, traversing in the native mapping table according to the access path request, and calling the traversed controller method instance.
3. The method according to claim 1 or 2, wherein the interface access request further carries a value of a calling name and a value of a controller method instance name; and the controller method instance is obtained by traversing the native mapping table according to the value of the calling name and the value of the controller method instance name.
4. The method according to claim 3, wherein the writing the generated mapping relationship information into the variable mapping table includes:
judging whether the size of the residual space in the mapping relation table is larger than a space threshold value or not;
if so, writing the generated mapping relation information into the variable relation table;
if not, deleting the mapping relation information with the longest unused time in the variable mapping table, and writing the generated mapping relation information into the variable mapping table after deletion.
5. The method of claim 1, 2 or 4, wherein the variable mapping table and the native mapping table are hash mapping tables.
6. The method of claim 5, wherein the variable mapping table is deployed at a framework layer of a Spring MVC architecture, and wherein the interface access request is from a service layer of Spring MVC.
7. The method according to claim 1 or 2 or 4 or 6, wherein the path parameters comprise a user identification and/or an organization identification.
8. An apparatus for invoking a controller method instance, comprising:
the receiving and sending unit is used for receiving an interface access request; the interface access request carries a path parameter and a value of the path parameter;
the identification unit is used for identifying the value type of the value of the path parameter;
the query unit is used for querying in a variable mapping table according to the value of the path parameter if the value type is a variable;
the calling unit is used for calling the inquired controller method instance if the controller method instance corresponding to the value of the path parameter is inquired;
and the writing unit is used for traversing in a native mapping table according to the interface access request if the controller method instance corresponding to the path parameter value is not inquired, acquiring the traversed controller method instance value in the native mapping table, calling the traversed controller method instance, mapping the traversed controller method instance ID and the traversed path parameter value of the controller method instance to generate mapping relation information, and writing the generated mapping relation information into the variable mapping table.
9. A computer storage medium, characterized in that it stores a plurality of instructions adapted to be loaded by a processor and to perform the method steps according to any one of claims 1 to 7.
10. A server, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the method steps of any of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210892731.6A CN115268401A (en) | 2022-07-27 | 2022-07-27 | Calling method and device of controller method instance, storage medium and server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210892731.6A CN115268401A (en) | 2022-07-27 | 2022-07-27 | Calling method and device of controller method instance, storage medium and server |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115268401A true CN115268401A (en) | 2022-11-01 |
Family
ID=83770507
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210892731.6A Pending CN115268401A (en) | 2022-07-27 | 2022-07-27 | Calling method and device of controller method instance, storage medium and server |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115268401A (en) |
-
2022
- 2022-07-27 CN CN202210892731.6A patent/CN115268401A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110765024B (en) | Simulation test method, simulation test device, electronic equipment and computer readable storage medium | |
US20200285508A1 (en) | Method and Apparatus for Assigning Computing Task | |
CN111694857B (en) | Method, device, electronic equipment and computer readable medium for storing resource data | |
CN113377809A (en) | Data processing method and apparatus, computing device, and medium | |
CN111125057B (en) | Method and device for processing service request and computer system | |
CN113760242A (en) | Data processing method, device, server and medium | |
CN112015468A (en) | Interface document processing method and device, electronic equipment and storage medium | |
CN108696649A (en) | Image processing method, device, equipment and computer readable storage medium | |
EP4060496A2 (en) | Method, apparatus, device and storage medium for running inference service platform | |
CN115268401A (en) | Calling method and device of controller method instance, storage medium and server | |
CN112000669B (en) | Environment monitoring data processing method and device, storage medium and terminal | |
CN112363980A (en) | Data processing method and device for distributed system | |
CN112148705A (en) | Data migration method and device | |
CN112559001A (en) | Method and device for updating application | |
CN114357334A (en) | Model access method and device, storage medium and computer equipment | |
CN112052152A (en) | Simulation test method and device | |
CN115334040B (en) | Method and device for determining Internet Protocol (IP) address of domain name | |
CN114358725A (en) | Enterprise property identification method and device, storage medium and computer equipment | |
CN113760886B (en) | Method, apparatus, device and computer readable medium for providing data service | |
CN111274104B (en) | Data processing method, device, electronic equipment and computer readable storage medium | |
CN112311833B (en) | Data updating method and device | |
CN111625524A (en) | Data processing method, device, equipment and storage medium | |
CN114416181A (en) | Serial port screen-based instruction processing method and device, storage medium and electronic equipment | |
CN115328949A (en) | Method and device for converting fields of analysis model, storage medium and computer equipment | |
CN115905322A (en) | Service processing method and device, electronic equipment and storage medium |
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 |