添加了hello Controller

This commit is contained in:
2026-05-03 12:06:19 +08:00
parent b67b10e346
commit b13595dc34

View File

@@ -4,12 +4,10 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class HelloController
{
@GetMapping("/")
public String index()
{
return "Hello World!";
}
}
public class HelloController {
@GetMapping("/hello")
public String sayHello() {
return "Hello from Spring Boot in Docker!";
}
}