Skip to content

Commit f06b24b

Browse files
author
eugenp
committed
updating mappings so that the project can be used for other purposes
1 parent 05cf9b7 commit f06b24b

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

spring-rest/src/main/java/org/baeldung/web/controller/BarMappingExamplesController.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import org.springframework.web.bind.annotation.ResponseBody;
88

99
@Controller
10+
@RequestMapping(value = "/ex")
1011
public class BarMappingExamplesController {
1112

1213
public BarMappingExamplesController() {

spring-rest/src/main/java/org/baeldung/web/controller/FooMappingExamplesController.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import org.springframework.web.bind.annotation.ResponseBody;
88

99
@Controller
10+
@RequestMapping(value = "/ex")
1011
public class FooMappingExamplesController {
1112

1213
public FooMappingExamplesController() {
@@ -59,10 +60,16 @@ public String getFoosWithHeaders() {
5960
return "Get some Foos with Header";
6061
}
6162

63+
// @RequestMapping(value = "/foos", method = RequestMethod.GET, headers = "Accept=application/json")
64+
// @ResponseBody
65+
// public String getFoosAsJsonFromBrowser() {
66+
// return "Get some Foos with Header Old";
67+
// }
68+
6269
@RequestMapping(value = "/foos", produces = { "application/json", "application/xml" })
6370
@ResponseBody
6471
public String getFoosAsJsonFromREST() {
65-
return "Get some Foos with Header Exact";
72+
return "Get some Foos with Header New";
6673
}
6774

6875
// advanced - multiple mappings

0 commit comments

Comments
 (0)