Skip to content

Commit d9216a5

Browse files
add HttpStatus.OK in WelcomeController.java
1 parent a666c97 commit d9216a5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/hexlet/code/controller/WelcomeController.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
package hexlet.code.controller;
22

33

4+
import org.springframework.http.HttpStatus;
45
import org.springframework.web.bind.annotation.GetMapping;
56
import org.springframework.web.bind.annotation.RequestMapping;
7+
import org.springframework.web.bind.annotation.ResponseStatus;
68
import org.springframework.web.bind.annotation.RestController;
79

810
@RestController
911
@RequestMapping("/welcome")
1012
public class WelcomeController {
1113

1214
@GetMapping
15+
@ResponseStatus(HttpStatus.OK)
1316
String welcome() {
1417
return "Welcome to Spring";
1518
}

0 commit comments

Comments
 (0)