Hey , so I am trying to learn Spring Boot again so I started a SB application , when I tried a curl command for locahost:8080/Hello , I am getting 404 Error
package com.hospital;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
package com.controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class HospitalController{
@GetMapping("/Hello")
public String Hello(){
return "Hello";
}
}
curl localhost:8080/Hello
{"timestamp":"2024-12-27T21:17:28.912+00:00","status":404,"error":"Not Found","path":"/Hello"}