Home > Back-end > After springboot form is submitted, the controller processing method throws an exception?
After springboot form is submitted, the controller processing method throws an exception?
Time:09-15
Springboot won't play, teach,
Try 1
This way, can get error pages, but behind the location. The href url specified need to spell a lot behind the parameter Try 2 I tried another way, submit the form directly, this kind of situation, if wrong, page is printed a json string, containing the error information
For regular practice, thank you, how to submit the form, and can receive friendly submitted, but not print json
CodePudding user response:
Remember correctly, the returned json can not directly parsing, xmlHttpRequest [attribute name string]
CodePudding user response:
Springboot simplifies a lot of Ajax, can parse the returned json data directly, with the following the operation
CodePudding user response:
Don't want when you are using ajax behind successful jump page address bar when a large number of parameters, right?
When the form submission, if error to jump back to the form page, form page judgment when you return to the code and the corresponding error MSG silently; Successful forwarding you a list page;
CodePudding user response:
Want to jump, don't respond to json use responsebody or similar annotations, direct server jump not line?