Announcement Announcement Module
No announcement yet.
Spring 3.2 and Matrix Variables Page Title Module
Move Remove Collapse
Conversation Detail Module
  • 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
    @RequestMapping(value = "/EventThroughputStats", method = RequestMethod.GET)
    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.