Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-9218

Value-oriented return method handling broken in 3.1

    Details

      Description

      I've noticed a significant difference in processing of controller methods introduced in 3.1, what stops me from migration from 3.0.

      In 3.0, method return values were observed to determine the appropriate handler. Using this feature, it was possible to define the method as returning Object and return anything appropriate for particular case: String with view name, concrete View instance, Custom object serialized to JSON, etc.

      Starting from 3.1, not the method return value but rather the declared method return type is taken into account, thus killing such a beautiful feature. According to the handler matching chain, for the Object return value, only the fallback handler for binding return values to model attributes is triggered.

      Please get this feature back!!!

        Attachments

          Activity

            People

            • Assignee:
              rstoya05-aop Rossen Stoyanchev
              Reporter:
              vypedrik Jiří Vypědřík
              Last updater:
              Chris Beams
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                6 years, 7 weeks, 2 days ago