No request handling method with name 'method name' in class [class name] error occurs when spring mvc uses ModelAndView

I have checked the title error for a long time in the afternoon, and there are various opinions on the Internet.

Later, it was found that the path of ModelAndView was wrong.

The correct path should be:

import org.springframework.web.servlet.ModelAndView;

 

 

Close-up notes, commemorating the mistake

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324965974&siteId=291194637