Criei o projeto, porém ele não apresenta a tela inicial de hello
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
@Controller
public class HelloController {
@GetMapping("/hello")
public String hello(HttpServletRequest request) {
return "hello";
}
}
Não apresenta erros no console
2022-05-19 19:07:48.319 INFO 19648 --- [ restartedMain] b.c.a.blog.BlogApplication : No active profile set, falling back to 1 default profile: "default"
2022-05-19 19:07:48.453 INFO 19648 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2022-05-19 19:07:48.453 INFO 19648 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2022-05-19 19:07:48.453 INFO 19648 --- [ restartedMain] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.63]
2022-05-19 19:07:48.464 INFO 19648 --- [ restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2022-05-19 19:07:48.464 INFO 19648 --- [ restartedMain] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 143 ms
2022-05-19 19:07:48.505 INFO 19648 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
2022-05-19 19:07:48.511 INFO 19648 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2022-05-19 19:07:48.513 INFO 19648 --- [ restartedMain] b.c.a.blog.BlogApplication : Started BlogApplication in 0.21 seconds (JVM running for 994.572)
2022-05-19 19:07:48.514 INFO 19648 --- [ restartedMain] .ConditionEvaluationDeltaLoggingListener : Condition evaluation unchanged
2022-05-19 19:08:00.195 INFO 19648 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
2022-05-19 19:08:00.195 INFO 19648 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2022-05-19 19:08:00.195 INFO 19648 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 0 ms
e obtenho apenas o seguinte erro:
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Thu May 19 19:18:50 BRT 2022
There was an unexpected error (type=Not Found, status=404).
No message available