Failed to start Spring REST application using Tomcat

I spent the weekend trying to run some simple Spring REST applications. Many examples on the net. However, whenever I had to run them, my application always gave me 404 - a resource exception not found. So that I do everything right, I even restarted the application from scratch several times.

If I go to the project folder and run mvn tomcat7: run the project as expected. However, adding the project to my Tomcat7 server inside Eclipse and running it there, I always get 404 error.

Any ideas on what is going wrong will be greatly appreciated.

project layout 1

project layout 2

0
source share
1

, src/main/java folder, , . ?

eclipse, Web Module Path, . : enter image description here

URL- enter image description here

, .

0

All Articles