GET http://localhost:8080/public/test/1,2,3,4
@RequestMapping(value="/test/{firstNameIds}", method=RequestMethod.GET)
@ResponseBody
public String test(@PathVariable String[] firstNameIds)
{
// firstNameIds: [1,2,3,4]
return "Dummy";
}
(tested with Spring MVC 4.0.1)
More Related Contents:
- What causes “java.lang.IllegalStateException: Neither BindingResult nor plain target object for bean name ‘command’ available as request attribute”?
- @RequestParam vs @PathVariable
- Spring Security : Multiple HTTP Config not working
- Redirect to an external URL from controller action in Spring MVC
- Difference between @Valid and @Validated in Spring
- Spring Boot Multiple Datasource
- Increase HTTP Post maxPostSize in Spring Boot
- java.lang.NoSuchMethodError: javax.servlet.ServletContext.getContextPath()Ljava/lang/String;
- Spring MVC type conversion : PropertyEditor or Converter?
- More than one fragment with the name [spring_web] was found. This is not legal with relative ordering
- What to return if Spring MVC controller method doesn’t return value?
- Spring Boot JSP 404
- Jackson 2.0 with Spring 3.1
- Redirect in Spring MVC
- Spring MVC – @Valid on list of beans in REST service
- Spring: define @RequestMapping value in a properties file
- How to reload a @Value property from application.properties in Spring? [duplicate]
- Configure ViewResolver with Spring Boot and annotations gives No mapping found for HTTP request with URI error
- Is it possible to have empty RequestParam values use the defaultValue?
- Spring 3.0 making JSON response using jackson message converter
- How to re-create database before each test in Spring?
- BeanNotOfRequiredTypeException due to autowired fields
- Autowiring fails: Not an managed Type
- Spring Partial Update Object Data Binding
- Spring AOP Advice on Annotated Controllers
- logging with AOP in spring?
- Accessing Spring beans from a Tiles view (JSP)
- How to pass a session attribute as method argument (parameter) with Spring MVC
- How to import value from properties file and use it in annotation?
- Maven- No plugin found for prefix ‘spring-boot’ in the current project and in the plugin groups