Spring Framework
  1. Spring Framework
  2. SPR-7354

Add equivalent of JAX-RS @Consumes to Spring MVC

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.3
    • Fix Version/s: 3.1 M2
    • Component/s: Web
    • Labels:
      None
    • Last commented by a User:
      false

      Description

      As a Spring MVC user, I would like the option to explicitly specify the media types a @Controller can accept. If a client POSTs a request body that is not of one of those media types, the server should return the UNSUPPORTED_MEDIA_TYPE (415) status.

      We should pursue semantic alignment with JAX-RS where possible. See http://jackson.codehaus.org/javadoc/jax-rs/1.0/javax/ws/rs/Consumes.html for a description of how JAX-RS supports this feature.

        Issue Links

          Activity

          Keith Donald created issue -
          Keith Donald made changes -
          Field Original Value New Value
          Description As a Spring MVC user, I would like the option to explicitly specify the media types a @Controller can produce. If a client does not accept at least one of those media types, the server should return the NOT_ACCEPTABLE (406) status.

          We should pursue semantic alignment with JAX-RS where possible. See http://jackson.codehaus.org/javadoc/jax-rs/1.0/javax/ws/rs/Produces.html for a description of how they support this feature.
          As a Spring MVC user, I would like the option to explicitly specify the media types a @Controller can accept. If a client POSTs a request body that is not of one of those media types, the server should return the UNSUPPORTED_MEDIA_TYPE (415) status.

          We should pursue semantic alignment with JAX-RS where possible. See http://jackson.codehaus.org/javadoc/jax-rs/1.0/javax/ws/rs/Consumes.html for a description of how JAX-RS supports this feature.
          Keith Donald made changes -
          Link This issue is related to SPR-7353 [ SPR-7353 ]
          Keith Donald made changes -
          Fix Version/s 3.1 M1 [ 11378 ]
          Trevor Marshall made changes -
          Workflow jira [ 32388 ] SPR Workflow [ 40228 ]
          Juergen Hoeller made changes -
          Fix Version/s 3.1 M2 [ 11379 ]
          Fix Version/s 3.1 M1 [ 11378 ]
          Arjen Poutsma made changes -
          Assignee Arjen Poutsma [ arjen.poutsma ]
          Arjen Poutsma made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Arjen Poutsma made changes -
          Summary Added equivalent of JAX-RS @Consumes to Spring MVC Add equivalent of JAX-RS @Consumes to Spring MVC
          Arjen Poutsma logged work - 11/Apr/11 6:00 AM
          • Time Spent:
            1d 1h 25m
             
            <No comment>
          Arjen Poutsma made changes -
          Worklog Id 28012 [ 28012 ]
          Remaining Estimate 0d [ 0 ]
          Time Spent 1d 1h 25m [ 33900 ]
          Arjen Poutsma made changes -
          Status In Progress [ 3 ] Open [ 1 ]
          Arjen Poutsma made changes -
          Fix Version/s 3.1 M2 [ 11379 ]
          Fix Version/s 3.1 RC1 [ 12208 ]
          Arjen Poutsma made changes -
          Fix Version/s 3.1 M2 [ 11379 ]
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 3.1 RC1 [ 12208 ]
          Chris Beams made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Trevor Marshall made changes -
          Workflow SPR Workflow [ 40228 ] New SPR Workflow [ 64250 ]
          Trevor Marshall made changes -
          Workflow New SPR Workflow [ 64250 ] SPR Workflow [ 73691 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open In Progress In Progress
          275d 2h 18m 1 Arjen Poutsma 07/Apr/11 4:15 AM
          In Progress In Progress Open Open
          59d 21h 43m 1 Arjen Poutsma 06/Jun/11 1:59 AM
          Open Open Resolved Resolved
          8d 3m 1 Arjen Poutsma 14/Jun/11 2:03 AM
          Resolved Resolved Closed Closed
          371d 1h 41m 1 Chris Beams 19/Jun/12 3:44 AM

            People

            • Assignee:
              Arjen Poutsma
              Reporter:
              Keith Donald
              Last updater:
              Trevor Marshall
            • Votes:
              4 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                3 years, 41 weeks, 4 days ago

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0d
                0d
                Logged:
                Time Spent - 1d 1h 25m
                1d 1h 25m