@Test public void testSingleIp() throws Exception { mockMvc.perform(get("/rest/ip/8.8.8.8").accept(MediaType.ALL)); }
@RequestMapping(value = "/ip/{singleIp:.+}", method = RequestMethod.GET) @ResponseBody @ResponseStatus(value = HttpStatus.OK) public void singleIp(@PathVariable("singleIp") String singleIp) { System.out.println("Single Ip:\t" + singleIp); }
MultiIPAddresses { @RequestMapping(value = "/ip/{singleIp:.+}", method = RequestMethod.GET) @ResponseBody @ResponseStatus(value = HttpStatus.OK) public void singleIp(@PathVariable("singleIp") String singleIp) { System.out.println("Single Ip:\t" + singleIp); } }
MultiIPAddresses { @RequestMapping(value = "/ip/{singleIp:.+}", method = RequestMethod.GET) @ResponseBody @ResponseStatus(value = HttpStatus.OK) public void singleIp(@PathVariable("singleIp") String singleIp) { System.out.println("Single Ip:\t" + singleIp); }  }
MultiIPAddresses { @RequestMapping(value = "/ip/{singleIp:.+}", method = RequestMethod.GET) @ResponseBody @ResponseStatus(value = HttpStatus.OK) public void singleIp(@PathVariable("singleIp") String singleIp) { System.out.println("Single Ip:\t" + singleIp); }  @RequestMapping(value = "/ip/{singleIp:.+}", method = RequestMethod.GET) @ResponseBody @ResponseStatus(value = HttpStatus.OK) void singleIp(@PathVariable("singleIp") String singleIp); @RequestMapping(value = "/ips/{multiIps:.+}", method = RequestMethod.GET) @ResponseBody @ResponseStatus(value = HttpStatus.OK) void multiIps(@PathVariable("multiIps") String multiIps); }
MultiIPAddresses { @RequestMapping(value = "/ip/{singleIp:.+}", method = RequestMethod.GET) @ResponseBody @ResponseStatus(value = HttpStatus.OK) public void singleIp(@PathVariable("singleIp") String singleIp) { System.out.println("Single Ip:\t" + singleIp); }  @RequestMapping(value = "/ip/{singleIp:.+}", method = RequestMethod.GET) @ResponseBody @ResponseStatus(value = HttpStatus.OK) void singleIp(@PathVariable("singleIp") String singleIp); @RequestMapping(value = "/ips/{multiIps:.+}", method = RequestMethod.GET) @ResponseBody @ResponseStatus(value = HttpStatus.OK) void multiIps(@PathVariable("multiIps") String multiIps);  }