参考stackoverflow:https://stackoverflow.com/questions/11227395/java-lang-classnotfoundexception-org-springframework-web-servlet-dispatcherserv
eclipse中:
- right click on your project and choose properties.
- click on Deployment Assembly.
- click add
- click on "Java Build Path Entries"
- select Maven Dependencies"
- click Finish.
idea中:
In idea Intellij you need to go to File -> Project Settings -> Artifacts. Then