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

spring-webmvc 3.2.1 no longer has spring-web as compile-time dependency

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Duplicate
    • Affects Version/s: 3.2.1
    • Fix Version/s: 3.2.2
    • Component/s: Web
    • Labels:
      None
    • Last commented by a User:
      false

      Description

      In 3.2.0 a Spring-MVC project did not require to additionally include the spring-web dependency (because it was already a compile-time dependency of spring-webmvc).

      In 3.2.1 it is now a provided dependency.
      This breaks pretty much every annotated controller (which uses e.g. @RequestMapping,@RequestHeader,@RequestParam...) with:

      ... package org.springframework.web.bind.annotation does not exist
      ... package org.springframework.http does not exist
      ... cannot find symbol
      

      The workaround is of course trivial, just to include spring-web as additional dependency of the according project:

      <dependency>
      <groupId>org.springframework</groupId>
         <artifactId>spring-web</artifactId>
          <version>${org.springframework-version}</version>
      </dependency>
      

      Was there a reason for the change?
      Then perhaps this should be documented in the changelog and/or migration section of the springframework reference document?

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                pwebb Phil Webb
                Reporter:
                anre Andreas R.
                Last updater:
                Juergen Hoeller
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  5 years, 44 weeks, 5 days ago