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

Profiles not discovered by DispatcherServlet Config

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Works as Designed
    • Affects Version/s: 3.1 GA
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
      None
    • Last commented by a User:
      true

      Description

      The Spring blog http://blog.springsource.org/2011/02/11/spring-framework-3-1-m1-released/ references the ability to configure "spring.profiles.active" as an "init-param" for DispatcherServlet. This feature does not work with DispatcherServlet, it does work with ContextLoaderListener.

      Web.xml servlet section:
      <servlet>
      <servlet-name>accounts</servlet-name>
      <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>

      <init-param>
      <param-name>contextConfigLocation</param-name>
      <param-value>/WEB-INF/mvc-config.xml</param-value>
      </init-param>
      <init-param>
      <param-name>spring.profiles.active</param-name>
      <param-value>PRODUCKSEAN</param-value>
      </init-param>
      <load-on-startup>1</load-on-startup>
      </servlet>

        Attachments

          Activity

            People

            • Assignee:
              cbeams Chris Beams
              Reporter:
              gordonad Gordon Dickens
              Last updater:
              Trevor Marshall
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

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