From f553784ebcb28afd189316fdd546367eec092333 Mon Sep 17 00:00:00 2001 From: "Ted M. Young" Date: Tue, 8 Oct 2019 13:14:08 -0700 Subject: [PATCH] Fix incorrect backslash escape in documentation sample See gh-18546 --- .../main/asciidoc/spring-boot-features.adoc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index 13612887cfc..8d98cd4be4b 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -1843,17 +1843,17 @@ The following code shows a typical `@RestController` that serves JSON data: @RequestMapping(value="/users") public class MyRestController { - @RequestMapping(value="/\{user}", method=RequestMethod.GET) + @RequestMapping(value="/{user}", method=RequestMethod.GET) public User getUser(@PathVariable Long user) { // ... } - @RequestMapping(value="/\{user}/customers", method=RequestMethod.GET) + @RequestMapping(value="/{user}/customers", method=RequestMethod.GET) List getUserCustomers(@PathVariable Long user) { // ... } - @RequestMapping(value="/\{user}", method=RequestMethod.DELETE) + @RequestMapping(value="/{user}", method=RequestMethod.DELETE) public User deleteUser(@PathVariable Long user) { // ... } @@ -2324,17 +2324,17 @@ The annotation-based one is quite close to the Spring MVC model, as shown in the @RequestMapping("/users") public class MyRestController { - @GetMapping("/\{user}") + @GetMapping("/{user}") public Mono getUser(@PathVariable Long user) { // ... } - @GetMapping("/\{user}/customers") + @GetMapping("/{user}/customers") public Flux getUserCustomers(@PathVariable Long user) { // ... } - @DeleteMapping("/\{user}") + @DeleteMapping("/{user}") public Mono deleteUser(@PathVariable Long user) { // ... } @@ -2351,9 +2351,9 @@ The annotation-based one is quite close to the Spring MVC model, as shown in the @Bean public RouterFunction monoRouterFunction(UserHandler userHandler) { - return route(GET("/\{user}").and(accept(APPLICATION_JSON)), userHandler::getUser) - .andRoute(GET("/\{user}/customers").and(accept(APPLICATION_JSON)), userHandler::getUserCustomers) - .andRoute(DELETE("/\{user}").and(accept(APPLICATION_JSON)), userHandler::deleteUser); + return route(GET("/{user}").and(accept(APPLICATION_JSON)), userHandler::getUser) + .andRoute(GET("/{user}/customers").and(accept(APPLICATION_JSON)), userHandler::getUserCustomers) + .andRoute(DELETE("/{user}").and(accept(APPLICATION_JSON)), userHandler::deleteUser); } }