olá estou com esse erro e gostaria que alguem pudesse me explicar e ajudar como resolver.
package br.com.alura.forum.controller;
import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody;
@Controller public class HelloController {
@RequestMapping("/")
@ResponseBody
public String hello () {
return "hello world !";
}
}
esse é meu código aqui em cima
. __ _ __ _ _ /\ / _'_ _ _ _()_ _ __ _ \ \ \ ( ( )___ | ' | '| | ' / ` | \ \ \ \/ ___)| |)| | | | | || (| | ) ) ) ) ' |__| .|| ||_| |_, | / / / / =========||==============|__/=//// :: Spring Boot :: (v2.7.1)
2022-07-04 11:33:19.063 INFO 4420 --- [ main] br.com.alura.forum.ForumApplication : Starting ForumApplication using Java 17.0.3 on Possante with PID 4420 (C:\Users\WTINFO PC\Downloads\java\forum\target\classes started by WTINFO PC in C:\Users\WTINFO PC\Downloads\java\forum) 2022-07-04 11:33:19.067 INFO 4420 --- [ main] br.com.alura.forum.ForumApplication : No active profile set, falling back to 1 default profile: "default" 2022-07-04 11:33:19.949 INFO 4420 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http) 2022-07-04 11:33:19.960 INFO 4420 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat] 2022-07-04 11:33:19.960 INFO 4420 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.64] 2022-07-04 11:33:20.059 INFO 4420 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext 2022-07-04 11:33:20.059 INFO 4420 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 941 ms 2022-07-04 11:33:20.364 WARN 4420 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Failed to start bean 'webServerStartStop'; nested exception is org.springframework.boot.web.server.PortInUseException: Port 8080 is already in use 2022-07-04 11:33:20.367 INFO 4420 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat] 2022-07-04 11:33:20.380 INFO 4420 --- [ main] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2022-07-04 11:33:20.395 ERROR 4420 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
APPLICATION FAILED TO START
Description:
Web server failed to start. Port 8080 was already in use.
Action:
Identify and stop the process that's listening on port 8080 or configure this application to listen on another port.
e esse é o erro do projeto.
olhei meu aplication.proprieties e ele está vazio e minha pergunta é:
o que eu coloco nele ????