3.1 to 4.0.0-GA Migration


  1. In, replace spring.instrument.path=../lib/spring-instrument-3.2.2.RELEASE.jar with spring.instrument.path=../lib/spring-instrument-4.1.0.RELEASE.jar
  2. In core/applicationContext.xml, remove beans blInventoryClassTransformer, customClassTransformers, and org.broadleafcommerce.common.extensibility.context.merge.LateStageMergeBeanPostProcessor
  3. Add fullName.required=Please enter your full name. to
  4. Add validator.address.fullNameOnly=false under "Spring Validators" in core/src/main/resources/runtime-properties/
  5. Add /sql/load_menu_data.sql to blPU.hibernate.hbm2ddl.import_files in core/src/main/resources/runtime-properties/
  6. Add the following property to core/src/main/resources/runtime-properties/

    # If set to true, the customer's email address will be used for login on the Site side

Solr Updates

BLC_FIELD Data Changes
  1. The PROPERTY_NAME column of BLC_FIELD must be updated to the following format if the field is obtained from a map: map(key).value. For example, productAttributes.heatRange would need to be changed to productAttributes(heatRange).value.
Updates for DemoSite's Solr schema.xml
  1. Add the following dynamic field:

    <dynamicField name="*_searchable" type="text_general" indexed="true" stored="false" />

Resource Handling

  1. Add the following bean to site/src/main/webapp/WEB-INF/applicationContext-filter.xml and admin/src/main/webapp/WEB-INF/applicationContext-admin-filter.xml.

    <bean id="resourceUrlEncodingFilter" class="org.springframework.web.servlet.resource.ResourceUrlEncodingFilter"/>

    Then add the bean id as the first element in the blPostSecurityFilterChain filter chain for each file.

  2. In admin/src/main/webapp/WEB-INF/applicationContext-admin.xml, replace blJsResources, cssLocations, and blCssResources bean definitions with the following:

    <bean id="blJsResources" parent="adminJsResourceHttpRequestHandlerBase" />
    <bean id="cssLocations" class="org.springframework.beans.factory.config.ListFactoryBean">
        <property name="sourceList">
    <bean id="blCssResources" parent="adminCssResourceHttpRequestHandlerBase" />
  3. In site/src/main/webapp/WEB-INF/applicationContext.xml, replace blJsResources, blCssResources, blImageResources, and blFontResources bean definitions with the following:

    <bean id="blJsResources" parent="siteJsResourceRequestHandlerBase" />
    <bean id="blCssResources" parent="siteCssResourceRequestHandlerBase" />
    <bean id="blImageResources" parent="siteImageResourceRequestHandlerBase" />
    <bean id="blFontResources" parent="siteFontResourceRequestHandlerBase" />
  4. Remove the webContentInterceptor bean from admin/src/main/webapp/WEB-INF/applicationContext-servlet-admin.xml and site/src/main/webapp/WEB-INF/applicationContext-servlet.xml.

  5. Add the following properties to core/src/main/resources/runtime-properties/

    # Note that when bundle.enabled is normally set to false in development as changes to 
    # file based resources (like CSS and JS) will not be picked up until the server is restarted 
    # if this setting is true   
    # Don't version resources in development.   If this property is true then changes to resources
    # on the file-system will require a server restart to be picked up.
    # Used by blc:bundle and blc:resource tags to better support client-side browser
    # caching (see the "staticResourceBrowserCacheSeconds" property below). 
    # Add no-cache headers to static resources in development to simplify debugging.
    # This property represents the number of seconds to add to static file cache headers.    This property is used
    # in the "demo" applicationContext.xml to set the cache-seconds property for 
    # HTTPResourceHandlers    
    # See org.springframework.web.servlet.resource.ResourceHttpRequestHandler
    # Don't minify static resources (JS and CSS) in dev as it makes debugging to difficult
    # Don't cache resources or transformations in development

Thymeleaf Layout Dialect

Broadleaf now officially supports Thymeleaf's layout dialect. This allows for a more intuitive and readable method of including frequently used page components. To make use of the layout dialect, simply add thymeleaf.useLayoutDialect=true to core/ and follow the documentation linked above.

TODO add link to DemoSite changelog

Inventory Management

The quantity available field on BLC_SKU as well as the CheckAvailabilityActivity and DecrementInventoryActivity have been added to the framework out of the box. If you have performed any of the steps from the 3.1.0 to 3.1.1 migration doc then you should undo them.

Page Field Data

The relationship of Pages to their PageFields has been changed from a @ManyToMany to a @OneToMany, with the owning column on blc_page_fld. This means that blc_page_fld_map has gone away and will no longer be used. To update your data, you can at your own risk run the following query:

  UPDATE blc_page_fld f SET page_id = (SELECT page_id FROM blc_page_fld_map m WHERE m.page_fld_id = f.page_fld_id)

Database Migration

Broadleaf provides the following Liquibase change logs to help with migrating your database:

Other Data Changes

  1. Change STARTING_DEPTH and ENDING_DEPTH of BLC_CAT_SITE_MAP_GEN_CFG to 0 to avoid MultiTenant Site Map configuration issues.

  2. Make sure that the SITE_DISC column of BLC_URL_HANDLER points to a PROFILE site rather than a STANDARD or TEMPLATE site.