java - Unable to run Spring REST application using Tomcat -


i have spent weekend trying run simple spring rest applications. lots of examples on net. however, whenever got running these, application give me 404 - resource not found exception. ensure doing right, restarted applications scratch few times.

if go project folder , run mvn tomcat7:run project works expected. however, when adding project tomcat7 server inside eclipse , running there, 404 error.

any ideas on going wrong appreciated.

project layout 1

project layout 2

i think problem src/main/java folder , said manually create it. did not add source after create it?

update import code eclipse,and modify web module path,and worked. here snap: enter image description here

and test url enter image description here

hope useful.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -