From dba65e82c06ff50258c1d63ef5f17a947cd532d9 Mon Sep 17 00:00:00 2001 From: Oliver Drotbohm Date: Fri, 16 Aug 2024 12:34:29 +0200 Subject: [PATCH] Switch to @GetMapping in Starbucks Sample. --- .../example/springdata/rest/stores/web/StoresController.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/rest/starbucks/src/main/java/example/springdata/rest/stores/web/StoresController.java b/rest/starbucks/src/main/java/example/springdata/rest/stores/web/StoresController.java index febca76a5..a1dee0fbb 100644 --- a/rest/starbucks/src/main/java/example/springdata/rest/stores/web/StoresController.java +++ b/rest/starbucks/src/main/java/example/springdata/rest/stores/web/StoresController.java @@ -34,8 +34,7 @@ import org.springframework.hateoas.LinkRelation; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; /** @@ -70,7 +69,7 @@ class StoresController { * @param pageable the pagination information * @return */ - @RequestMapping(value = "/", method = RequestMethod.GET) + @GetMapping("/") String index(Model model, @RequestParam Optional location, @RequestParam Optional distance, Pageable pageable) {