Another way I do is:
@RequestMapping(value = "test_handler/**", method = RequestMethod.GET)
…and your test handler can be “/test_hanlder/a/b/c” and you will get the whole value using following mechanism.
requestedUri = (String)
request.getAttribute(HandlerMapping.PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE);
More Related Contents:
- What’s the difference between @Component, @Repository & @Service annotations in Spring?
- How to respond with HTTP 400 error in a Spring MVC @ResponseBody method returning String?
- Passing multiple variables in @RequestBody to a Spring MVC controller using Ajax
- Spring MVC – How to get all request params in a map in Spring controller?
- How to serve .html files with Spring
- Spring MVC – How to return simple String as JSON in Rest Controller
- CORS allowed-origin restrictions aren’t causing the server to reject requests
- How to manage REST API versioning with spring?
- How to set base url for rest in spring boot?
- @Valid annotation is not validating the list of child objects
- Howto get rid of ?
- Spring WebSocket @SendToSession: send message to specific session
- In Spring MVC, how can I set the mime type header when using @ResponseBody
- Unable to complete the scan for annotations for web application [/app] due to a StackOverflowError
- request scoped beans in spring testing
- Spring security does not allow CSS or JS resources to be loaded
- how to display custom error message in jsp for spring security auth exception
- spring mvc not returning json content – error 406
- Spring: define @RequestMapping value in a properties file
- Abstract Method Error
- Manually call Spring Annotation Validation
- how to get param in method post spring mvc?
- Spring security added prefix “ROLE_” to all roles name?
- Why this Spring application with java-based configuration don’t work properly
- Return a stream with Spring MVC’s ResponseEntity
- What are annotations and how do they actually work for frameworks like Spring?
- How I create an error handler (404, 500…) in Spring Boot/MVC
- Spring-MVC 406 Not Acceptable instead of JSON Response
- java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet error
- Spring MVC: How to modify json response sent from controller