完成了对其的浏览器本地化部署。
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
package org.example.docker_project.Controller;
|
package org.example.docker_project.Controller; // 包名要和文件夹路径一致
|
||||||
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
@@ -6,7 +6,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
@RestController
|
@RestController
|
||||||
public class HelloController {
|
public class HelloController {
|
||||||
|
|
||||||
@GetMapping("/hello")
|
@GetMapping({"/hello","/","/Isharmla"})
|
||||||
public String sayHello() {
|
public String sayHello() {
|
||||||
return "Hello from Spring Boot in Docker!";
|
return "Hello from Spring Boot in Docker!";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user