You can use modelAndView, but it is recommended that the judgment logic be placed in the service layer, so that the execution result is returned directly and the success is judged on the front end. There is no need to judge whether to jump to the success interface in the background
You have to think clearly whether this method needs to return data or jump to a page. I think the suggestion above is OK. Put the data into the model and then return the page
Here you can customize an ApiResult class as the carrier of the return value,
{
}
You can use modelAndView, but it is recommended that the judgment logic be placed in the service layer, so that the execution result is returned directly and the success is judged on the front end. There is no need to judge whether to jump to the success interface in the background
You have to think clearly whether this method needs to return data or jump to a page. I think the suggestion above is OK. Put the data into the model and then return the page