How to Solve Warning: No mapping found for HTTP request with URI [] in DispatcherServlet with name

When configuring spring MVC, the following error was reported

Warning: No mapping found for HTTP request with URI [/world/kaptcha.do] in DispatcherServlet with name 'world'

The directory structure is as follows:

After checking for a long time, it was found that the matching part of the package scanner in the spring configuration file was wrongly written

The following is the error section. Base package is written as world; The correct way to write it should be base package = “world”, which means all the files under the world package, not all the sub packages under the world

Similar Posts: