@@ -1843,17 +1843,17 @@ The following code shows a typical `@RestController` that serves JSON data:
18431843 @RequestMapping(value="/users")
18441844 public class MyRestController {
18451845
1846- @RequestMapping(value="/\ {user}", method=RequestMethod.GET)
1846+ @RequestMapping(value="/{user}", method=RequestMethod.GET)
18471847 public User getUser(@PathVariable Long user) {
18481848 // ...
18491849 }
18501850
1851- @RequestMapping(value="/\ {user}/customers", method=RequestMethod.GET)
1851+ @RequestMapping(value="/{user}/customers", method=RequestMethod.GET)
18521852 List<Customer> getUserCustomers(@PathVariable Long user) {
18531853 // ...
18541854 }
18551855
1856- @RequestMapping(value="/\ {user}", method=RequestMethod.DELETE)
1856+ @RequestMapping(value="/{user}", method=RequestMethod.DELETE)
18571857 public User deleteUser(@PathVariable Long user) {
18581858 // ...
18591859 }
@@ -2324,17 +2324,17 @@ The annotation-based one is quite close to the Spring MVC model, as shown in the
23242324 @RequestMapping("/users")
23252325 public class MyRestController {
23262326
2327- @GetMapping("/\ {user}")
2327+ @GetMapping("/{user}")
23282328 public Mono<User> getUser(@PathVariable Long user) {
23292329 // ...
23302330 }
23312331
2332- @GetMapping("/\ {user}/customers")
2332+ @GetMapping("/{user}/customers")
23332333 public Flux<Customer> getUserCustomers(@PathVariable Long user) {
23342334 // ...
23352335 }
23362336
2337- @DeleteMapping("/\ {user}")
2337+ @DeleteMapping("/{user}")
23382338 public Mono<User> deleteUser(@PathVariable Long user) {
23392339 // ...
23402340 }
@@ -2351,9 +2351,9 @@ The annotation-based one is quite close to the Spring MVC model, as shown in the
23512351
23522352 @Bean
23532353 public RouterFunction<ServerResponse> monoRouterFunction(UserHandler userHandler) {
2354- return route(GET("/\ {user}").and(accept(APPLICATION_JSON)), userHandler::getUser)
2355- .andRoute(GET("/\ {user}/customers").and(accept(APPLICATION_JSON)), userHandler::getUserCustomers)
2356- .andRoute(DELETE("/\ {user}").and(accept(APPLICATION_JSON)), userHandler::deleteUser);
2354+ return route(GET("/{user}").and(accept(APPLICATION_JSON)), userHandler::getUser)
2355+ .andRoute(GET("/{user}/customers").and(accept(APPLICATION_JSON)), userHandler::getUserCustomers)
2356+ .andRoute(DELETE("/{user}").and(accept(APPLICATION_JSON)), userHandler::deleteUser);
23572357 }
23582358
23592359 }
0 commit comments