Spring Framework
  1. Spring Framework
  2. SPR-8749

Need a way to disable behavior added in "Automatically expose @PathVariables in the Model" SPR-7543

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Complete
    • Affects Version/s: 3.1 M2
    • Fix Version/s: 3.1 RC1
    • Component/s: Web
    • Labels:
      None
    • Last commented by a User:
      false

      Description

      SPR-7543 made the change to automatically expose @PathVariables in the model. However, that change makes the means used to "unwrap" json, which rely on the Model having exactly 1 item in it, not work. For instance, the workout around posted here: http://pascaldimassimo.com/2010/04/13/how-to-return-a-single-json-list-out-of-mappingjacksonjsonview/ no longer works, nor does the configuration option http://static.springsource.org/spring/docs/3.1.x/javadoc-api/org/springframework/web/servlet/view/json/MappingJacksonJsonView.html#setExtractValueFromSingleKeyModel%28boolean%29 do anything any more.

      There needs to be a way to disable automatically exposing @PathVariables in the model.

        Issue Links

          Activity

          Hide
          Rossen Stoyanchev added a comment -

          Please, try this with the latest code. A change was made after 3.1 M2 where path variables are exposed from AbstractView where view implementations can choose whether it makes sense to do that or not – JSON and XML views choose not to do that by default.

          Show
          Rossen Stoyanchev added a comment - Please, try this with the latest code. A change was made after 3.1 M2 where path variables are exposed from AbstractView where view implementations can choose whether it makes sense to do that or not – JSON and XML views choose not to do that by default.

            People

            • Assignee:
              Rossen Stoyanchev
              Reporter:
              Craig
              Last updater:
              Trevor Marshall
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                2 years, 28 weeks, 3 days ago