No mapping found for HTTP request with URI [/springmvc02/user/testString] in DispatcherServlet wit

No mapping found for HTTP request with URI [/springmvc02/user/testString] in DispatcherServlet with name ‘dispatcherServlet’ 错误

当用idea springmvc框架写web项目时,跳转页面报此错误:
No mapping found for HTTP request with URI [/springmvc02/user/testString] in DispatcherServlet wit

在配置文件没有写错的情况下,
可以检查按照下面方法看能否解决
点击 run->debug->edit configurations->defauls->tomcat server->local->Deployment->点击+,如下图
然后点击apply
No mapping found for HTTP request with URI [/springmvc02/user/testString] in DispatcherServlet wit