Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-10187

Custom contextPath no longer working in SpringBootProcessApplication 3.2.0 with Spring Boot 2.1.1.RELEASE

      I am trying to upgrade to the camunda spring boot starter 3.2.0 with Camunda 7.10.0 and Spring 2.1.1.RELEASE, according to https://docs.camunda.org/manual/latest/user-guide/spring-boot-integration/version-compatibility/

      I have a custom server.servlet.contextPath setting in application.yml, but that does not seem to work anymore - while the web application still comes up at that contextPath, the Tasklist doesn't find its embedded forms in the application resources with the new version.

      Reason: The contextPath is / because this code in SpringBootProcessApplication no longer gets invoked:

          @ConditionalOnWebApplication
          @Configuration
          class WebApplicationConfiguration implements ServletContextAware {
      
            @Override
            public void setServletContext(ServletContext servletContext) {
              if (!StringUtils.isEmpty(servletContext.getContextPath())) {
                contextPath = servletContext.getContextPath();
              }
            }
          }
      

      Do I miss something obvious? Have I found a bug?

        This is the controller panel for Smart Panels app

            [CAM-10187] Custom contextPath no longer working in SpringBootProcessApplication 3.2.0 with Spring Boot 2.1.1.RELEASE

            Hi dschulten,

            Thank you for the information. Do you have a test project that we could use to reproduce the problem?

            Best,
            Nikola

            Nikola Koevski added a comment - Hi dschulten , Thank you for the information. Do you have a test project that we could use to reproduce the problem? Best, Nikola

            Dietrich Schulten added a comment - - edited

            Dietrich Schulten added a comment - - edited Here you go: https://github.com/dschulten/camunda-get-started-spring-boot Custom contextPath is: http://localhost:8080/my/camunda/app/tasklist/default/ See application.yaml

            Also note that when using a customPath, the auto-redirect for the root path redirecting to the webapps, no longer works. You get 404 not found

            Stephen Russett added a comment - Also note that when using a customPath, the auto-redirect for the root path redirecting to the webapps, no longer works. You get 404 not found

            Related: there is a setting camunda.bpm.webapp.index-redirect-enabled which allows to switch off the redirection. A possible fix should still support that.

            Dietrich Schulten added a comment - Related: there is a setting camunda.bpm.webapp.index-redirect-enabled which allows to switch off the redirection. A possible fix should still support that.

            Hi dschulten,

            Thank you for the report and sorry for the long delay.

            I have confirmed the bug and have forwarded it for a decision on how to move forward with it.

            Best,
            Nikola

            Nikola Koevski added a comment - Hi dschulten , Thank you for the report and sorry for the long delay. I have confirmed the bug and have forwarded it for a decision on how to move forward with it. Best, Nikola

            Hi dschulten,

            We will try to fix this during the development of the Spring Boot starter 3.4.0, which is due for end of November. We may then also provide the fix for previous versions of the starter. In addition, we are happy to receive a contribution with a bug fix.

            Cheers,
            Thorben

            Thorben Lindhauer added a comment - Hi dschulten , We will try to fix this during the development of the Spring Boot starter 3.4.0, which is due for end of November. We may then also provide the fix for previous versions of the starter. In addition, we are happy to receive a contribution with a bug fix. Cheers, Thorben

              nikola.koevski Nikola Koevski
              dschulten Dietrich Schulten
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: