#Get Request Not showing in Spring Boot

1 messages · Page 1 of 1 (latest)

potent vortex
#

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"}

ionic cloakBOT
#

<@&1004656351647117403> please have a look, thanks.

potent vortex