添加了hello Controller
This commit is contained in:
@@ -4,12 +4,10 @@ import org.springframework.web.bind.annotation.GetMapping;
|
|||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
public class HelloController
|
public class HelloController {
|
||||||
{
|
|
||||||
@GetMapping("/")
|
@GetMapping("/hello")
|
||||||
public String index()
|
public String sayHello() {
|
||||||
{
|
return "Hello from Spring Boot in Docker!";
|
||||||
return "Hello World!";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user