package com.wjiec.springaio.cloud.item.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/item")
public class ItemController {

    @GetMapping("/{name}")
    public String item(@PathVariable String name) {
        return name;
    }

}

@@ -487,11 +487,142 @@
    %7D%0D%0A%0D%0A
+    @GetMapping(%22/%7Bname%7D/price%22)%0D%0A    public Integer price(@PathVariable String name) %7B%0D%0A        return name.hashCode();%0D%0A    %7D%0D%0A%0D%0A
 %7D%0D%0A

update item-service