I am trying to run a simple spring-boot application but every time I am getting 404. Even with the simple setting and no code. any clue what am I missing to run this application?
Asked
Active
Viewed 2,929 times
2 Answers
3
That's the expected outcome. The 404 is a real HTTP response from your Tomcat server. As you are starting an empty Spring Boot project, there's nothing to serve and the "Whitelabel Error Page" is the default Spring Boot 404 page.
To understand the difference when your Spring Boot application is not running, stop the Spring Boot application and then revisit http://localhost:8080.
You can now follow this Spring Boot guide and add your own endpoints to your project.

rieckpil
- 10,470
- 3
- 32
- 56
-
Thanks for your answer, now it works :-) I was wondering why I am getting 404 but ofcourse there was nothg to server so it was showing 404. Thanks a lot. – As3Script Mar 22 '22 at 07:40
0
Rieckpil is correct by saying TOMCAT is giving you the 404 reply and therefore running. However, if you stop/start tomcat then the normal page will load from there on.
Thanks!

BMET1
- 1
- 1
-
Welcome to SO! In this case, what would be the "normal" page as the OP did just deploy an "empty" Spring Boot application? And why would a restart of the Tomcat change anything? – ahuemmer Sep 09 '22 at 10:10