Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-14724

14.6 Spring Boot doesn't work with existing Spring contexts, breaks minor upgrade

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Top
    • Resolution: Won't Fix
    • 14.6.0
    • None
    • None
    • Flagged
    • Pulsar

    Description

      Many implementation projects have project-level Spring application contexts in the CMS.
      The addition of Spring Boot in 14.6, on behalf of Actuator monitoring, makes projects break on a minor upgrade.

      A workaround solution is to remove Spring Boot libraries (so not use actuator):

      <dependency>
        <groupId>org.onehippo.cms7</groupId>
        <artifactId>hippo-package-cms-dependencies</artifactId>
        <type>pom</type>
        <exclusions>
          <exclusion>
             <groupId>org.onehippo.cms7</groupId>
             <artifactId>spring-boot</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

      Another way to make this work is by importing the old XML-based configuration in a Spring Boot managed component, in which is loaded as additional XML-context into Spring Boot:

      package org.bloomreach.xm.cms;
      
      import org.springframework.context.annotation.Configuration;
      import org.springframework.context.annotation.ImportResource;
      
      @Configuration
      @ImportResource({"classpath*:spring/applicationContext-custom.xml"})
      public class CustomConfiguration {}
      

      Clients do really like having Spring boot and would like to
      A) have additional contexts work out of the box
      B) have some documentation on how to leverage Spring Boot for custom parts

      Examples

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jhoffman Jeroen Hoffman
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: