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

Data interaction method based on fetch and springmvc

A data interaction and data technology, applied in transmission systems, electrical components, etc., can solve problems such as inability to obtain parameter values, achieve fast and stable network interaction, save network resources, and reduce complexity and difficulty

Active Publication Date: 2022-03-18
山东九州信泰信息科技股份有限公司
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, the problem that comes with it is that when the server is using the J2EE and springMVC frameworks, due to the different methods of data requests, they are all json-type data transmitted, so AJAX can seamlessly interact with springMVC. In the Controller layer of springMVC, the annotation @RequestParam is used to obtain the parameters after the verification and data type conversion, while Fetch gets null when using the annotation @RequestParam to obtain the parameters, even using the getParameter("parameter name") method of HttpServletRequest Can't get parameter value

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
  • Data interaction method based on fetch and springmvc

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0019] Attached below figure 1 The present invention will be further described.

[0020] A data interaction method based on Fetch and springMVC, comprising the following steps:

[0021] S11) The browser of the client performs a data request to the server in Fetch mode;

[0022] S12) The server side parses the requested data through the Filter module in Java;

[0023] S13) The server side replaces the current request in Java with the entity class of the request wrapper through the Filter module in Java, and obtains the replaced request wrapper. The entity class of the request wrapper is the entity class of HttpServletRequestWrapper.

[0024] S14) The server side obtains the request wrapper after replacement through the springMCV module in Java, and the Controller layer in the springMCV module obtains the parameters after the checksum and data type conversion by means of annotations;

[0025] S15) The server processes the request sent by the client and returns data to Fetch;...

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

A method based on data interaction between Fetch and springMVC, which can solve the problem that the server cannot obtain parameters in the form of annotations in the data interaction between Fetch and springMVC through data interaction, so that the springMVC framework can be used when the two interact with each other. The parameter binding annotation module obtains the parameters after the verification and type conversion, and realizes the seamless connection between the server and the client data interaction. By realizing the seamless connection of data interaction, the complexity and difficulty of development can be greatly reduced. The advantages of Fetch technology itself and the above data interaction methods realize the purpose of saving network resources and make network interaction fast and stable.

Description

technical field [0001] The invention relates to the technical field of HTTP data request, in particular to a data interaction method based on Fetch and springMVC. Background technique [0002] A new HTTP data request method is added to the WEB front-end language ES6, which is Fetch. It has many similar functions to AJAX, but Fetch is designed to be more scalable and efficient than AJAX. Therefore, in more and more WEB application development, Fetch began to be widely used, and traditional AJAX was gradually replaced by Fetch. However, the problem that comes with it is that when the server is using the J2EE and springMVC frameworks, due to the different methods of data requests, they are all json-type data transmitted, so AJAX can seamlessly interact with springMVC. In the Controller layer of springMVC, the annotation @RequestParam is used to obtain the parameters after the verification and data type conversion, while Fetch gets null when using the annotation @RequestParam t...

Claims

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

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): H04L67/02H04L67/565
CPCH04L67/02H04L67/565
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