Uploaded image for project: 'Spring Tool Suite'
  1. Spring Tool Suite
  2. STS-697

STS's WTP Web Project Config Detection of MVC app fails to detect ContextLoaderListener context file

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 2.2.1.RELEASE
    • Fix Version/s: Sprint 8, 2.3.1.RELEASE
    • Component/s: None
    • Labels:
      None

      Description

      1. I created an mvc application from the Spring project template tool
      2. Added the following to web.xml:
      <listener>
      <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
      </listener>

      <context-param>
      <param-name>contextConfigLocation</param-name>
      <param-value>classpath:META-INF/spring/applicationContext.xml</param-value>
      </context-param>

      3. Added META-INF/spring/applicationContext.xml to src/main/resources.

      The Spring config detection doesn't appear to detect the existence of my META-INF/spring/applicationContext.xml config file. This used to work I believe in 2.0 but fails to work in 2.1 and 2.2.

      I've included a sample project.

        Activity

        Hide
        youngm@gmail.com Mike Youngstrom added a comment -

        Sample project.
        1. imported through maven
        2. Add Spring nature
        3. note that the bean in META-INF/spring/applicationContext.xml doesn't appear in spring bean outline.

        Show
        youngm@gmail.com Mike Youngstrom added a comment - Sample project. 1. imported through maven 2. Add Spring nature 3. note that the bean in META-INF/spring/applicationContext.xml doesn't appear in spring bean outline.
        Hide
        cdupuis Christian Dupuis added a comment -

        This is indeed a regression that we introduced with 2.2.x. I fixed it.

        Thanks for reporting this.

        Christian

        Show
        cdupuis Christian Dupuis added a comment - This is indeed a regression that we introduced with 2.2.x. I fixed it. Thanks for reporting this. Christian

          People

          • Assignee:
            Unassigned
            Reporter:
            youngm@gmail.com Mike Youngstrom
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: