@Test public void testMultiIps() throws Exception { mockMvc.perform(get("/rest/ips/8.8.8.8,8.8.4.4")); }
@RequestMapping(value = "/ips/{multiIps:.+}", method = RequestMethod.GET) @ResponseBody @ResponseStatus(value = HttpStatus.OK) public void multiIps(@PathVariable("multiIps") String multiIps) { if (!"".equals(multiIps.trim())) { String[] ips = multiIps.split(","); for (String ip : ips) { System.out.println(ip + " "); } } }
MultiIPAddresses { @RequestMapping(value = "/ips/{multiIps:.+}", method = RequestMethod.GET) @ResponseBody @ResponseStatus(value = HttpStatus.OK) public void multiIps(@PathVariable("multiIps") String multiIps) { if (!"".equals(multiIps.trim())) { String[] ips = multiIps.split(","); for (String ip : ips) { System.out.println(ip + " "); } } } }
MultiIPAddresses { @RequestMapping(value = "/ips/{multiIps:.+}", method = RequestMethod.GET) @ResponseBody @ResponseStatus(value = HttpStatus.OK) public void multiIps(@PathVariable("multiIps") String multiIps) { if (!"".equals(multiIps.trim())) { String[] ips = multiIps.split(","); for (String ip : ips) { System.out.println(ip + " "); } } }  }
MultiIPAddresses { @RequestMapping(value = "/ips/{multiIps:.+}", method = RequestMethod.GET) @ResponseBody @ResponseStatus(value = HttpStatus.OK) public void multiIps(@PathVariable("multiIps") String multiIps) { if (!"".equals(multiIps.trim())) { String[] ips = multiIps.split(","); for (String ip : ips) { System.out.println(ip + " "); } } }  @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 = "/ips/{multiIps:.+}", method = RequestMethod.GET) @ResponseBody @ResponseStatus(value = HttpStatus.OK) public void multiIps(@PathVariable("multiIps") String multiIps) { if (!"".equals(multiIps.trim())) { String[] ips = multiIps.split(","); for (String ip : ips) { System.out.println(ip + " "); } } }  @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);  }