Após criar o projeto fiz a primeira parte da MedicoController
@RestController
@RequestMapping("medicos")
public class MedicoController {
@PostMapping
public void cadastrar(String dadosMedico){
System.out.println(dadosMedico);
}
}
Startei a aplicação e fiz a chamada via Insomnia para a api ele retorna 404
Log do servidor
2023-07-21T23:03:29.069-03:00 INFO 36572 --- [ restartedMain] med.voll.api.ApiApplication : Starting ApiApplication using Java 17 with PID 36572 (C:\Users\mesousa3\devel\api\target\classes started by mesousa3 in C:\Users\mesousa3\devel\api)
2023-07-21T23:03:29.069-03:00 INFO 36572 --- [ restartedMain] med.voll.api.ApiApplication : No active profile set, falling back to 1 default profile: "default"
2023-07-21T23:03:29.161-03:00 INFO 36572 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2023-07-21T23:03:29.161-03:00 INFO 36572 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2023-07-21T23:03:29.161-03:00 INFO 36572 --- [ restartedMain] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.11]
2023-07-21T23:03:29.173-03:00 INFO 36572 --- [ restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2023-07-21T23:03:29.174-03:00 INFO 36572 --- [ restartedMain] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 104 ms
2023-07-21T23:03:29.206-03:00 INFO 36572 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
2023-07-21T23:03:29.224-03:00 INFO 36572 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2023-07-21T23:03:29.226-03:00 INFO 36572 --- [ restartedMain] med.voll.api.ApiApplication : Started ApiApplication in 0.176 seconds (process running for 762.96)
2023-07-21T23:03:29.227-03:00 INFO 36572 --- [ restartedMain] .ConditionEvaluationDeltaLoggingListener : Condition evaluation unchanged
2023-07-21T23:03:36.324-03:00 INFO 36572 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
2023-07-21T23:03:36.325-03:00 INFO 36572 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2023-07-21T23:03:36.325-03:00 INFO 36572 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 0 ms
2023-07-21T23:04:13.341-03:00 INFO 36572 --- [ File Watcher] rtingClassPathChangeChangedEventListener : Restarting due to 1 class path change (0 additions, 1 deletion, 0 modifications)
2023-07-21T23:04:13.370-03:00 INFO 36572 --- [ Thread-55] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2023-07-21T23:04:13.371-03:00 INFO 36572 --- [ Thread-55] o.a.c.c.C.[Tomcat].[localhost].[/] : Destroying Spring FrameworkServlet 'dispatcherServlet'
Alguém tem alguma dica de configuração a ser realizada para a aplicação funcionar?
As configurações de restart automatico foram feitas no Intellig