Skip to content

Commit cc23ac5

Browse files
wugangcaKevinGilmore
authored andcommitted
BAEL-2988 Make the code consistent with the article. (eugenp#7870)
* BAEL-2988 Make the code consistent with the article. * BAEL-2988 Use @GetMapping annotation based on the feedback.
1 parent 9ad7ed0 commit cc23ac5

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

spring-rest-simple/src/main/java/com/baeldung/cors/EnumController.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.baeldung.cors;
22

33
import org.springframework.web.bind.annotation.CrossOrigin;
4+
import org.springframework.web.bind.annotation.GetMapping;
45
import org.springframework.web.bind.annotation.PathVariable;
56
import org.springframework.web.bind.annotation.RequestMapping;
67
import org.springframework.web.bind.annotation.RequestParam;
@@ -13,12 +14,12 @@
1314
@RequestMapping("/enums")
1415
public class EnumController {
1516

16-
@RequestMapping("/mode2str")
17+
@GetMapping("/mode2str")
1718
public String getStringToMode(@RequestParam("mode") Modes mode) {
1819
return "good";
1920
}
2021

21-
@RequestMapping("/findbymode/{mode}")
22+
@GetMapping("/findbymode/{mode}")
2223
public String findByEnum(@PathVariable Modes mode) {
2324
return "good";
2425
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package com.baeldung.model;
22

33
public enum Modes {
4-
ALPHA, DELTA
4+
ALPHA, BETA;
55
}

0 commit comments

Comments
 (0)