Using Eclipse Neon, I'm following the simple Spring Hello World tutorial here , but I'm getting a 404 error. This is a Maven project.
You can see my code on GitHub . The project builds, and the server (Tomcat v7.0) starts just fine. But when I go to http://localhost:8080/gs-rest-service/ , http://localhost:8080/gs-rest-service/greeting , or http://localhost:8080/greeting , I get the 404 error.
Can anyone help explain why, and how I can fix the error?
Hi this projects(pom) already contains inbuilt tomcat so You don't need to run this on separate server. Just build using
mvn clean install
java -jar target/gs-rest-service-0.1.0-SNAPSHOT.jar
And now check end point it will work.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.