Announcement Announcement Module
Collapse
No announcement yet.
Spring 3.2 and Matrix Variables Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring 3.2 and Matrix Variables

    Can Matrix Variables ever be used without a corresponding @PathVariable? Or, must they always be bound to a @PathVariable either explicitly using the pathVar attribute or implicitly to the last @PathVariable on the URI?

    For example, I try to use the following
    Code:
    @RequestMapping(value = "/EventThroughputStats", method = RequestMethod.GET)
    @ResponseStatus(HttpStatus.OK)
    public EventThroughputStats eventThroughputStats(
            @MatrixVariable final Date startTime,
            @MatrixVariable(required = false) final Date endTime,
            @MatrixVariable(required = false) final String[] hosts
            ) throws IOException {
    }
    But receive an HTTP 404 error message with /EventThroughputStats;startTime=2013-01-27.

    The same appears to be the case when I bind the @MatrixVariable to a Map<String,String>.

    Thanks for your help.
Working...
X