@RequestMapping("/hello") public class HelloWorldController { @GetMapping("/hello1") public String helloWorld1() { return "Hello World1"; } @GetMapping("/hello2") public String helloWorld2() { return "Hello World2"; } } package com.yachiy.spring.introduction.controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; @RestController public class HelloWorldController { @GetMapping("/hello/hello1") public String helloWorld1() { return "Hello World1"; } @RequestMapping(value = “/hello/hello2”, method = RequestMethod.GET) public String helloWorld2() { return "Hello World2"; } } ಉ͜͡ͱΛ࣮ݱͯ͠Δ ˠͩͬͨΒࠨͷ΄͏͕Θ͔Γ͍͢