Skip to content

Commit 8ef434d

Browse files
authored
Update HelloController.java
Need to use specific mapping for functions
1 parent 7ef3e1f commit 8ef434d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Spring_RestController_RestApi/todolist/src/main/todolist.hello/HelloController.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
it using @RestController directive*/
66
import org.springframework.web.bind.annotation.RequestMapping;
77
@RestController
8+
@RequestMapping("")
89
public class HelloController {
910
//To make the request I need to map the request/method to a function inside a Controller
10-
@RequestMapping("/hello")
11+
@GetMapping("/hello")
1112
public String SayHi(){
12-
return "Hello There 2526, go learn 26265 the best programming language";
13+
return "Hello There 6627, go learn sql the best programming language";
1314
}
1415
}

0 commit comments

Comments
 (0)