Bloomreach Content and Spring
Overview
Bloomreach Content uses Spring Boot (in CMS webapp) and Spring Framework (in CMS and site webapps), for example for dependency injection and aspect-oriented Programming within its delivery framework (HST) to manage internal components.
This page explains:
-
Supported Spring Boot and Spring Framework versions for each Bloomreach Content release
-
How the delivery framework manages its internal Spring ApplicationContexts
-
How to override or extend internal components
-
How to access internal components programmatically
Version Compatibility
| Bloomreach Content | Spring Boot | Spring Framework | End of OSS Support * |
|---|---|---|---|
| 17.x | 4.x | 7.x | December 2027 |
| 16.9.x | 3.5.x | 6.2.x | June 2026 |
| 15.7.x | 2.7.x | 5.3.x | June 2023 |
(*) See Spring Boot Support table for complete time lines.
Spring Framework Usage in the Delivery Framework
The delivery framework manages all internal container components using Spring Framework ApplicationContexts and relies on Dependency Injection for component wiring.
Internal Component Management
The delivery framework maintains several internal components, including:
-
JCR Session Pool
-
Request Processing Pipeline
-
Hosts, Site, and Channel Configuration Management
-
Observation Event Listeners
-
Cache Management
-
Security
These components support the framework's Context/Content-oriented Hierarchical MVC architecture.
The framework requires a reliable Dependency Injection container. Spring Framework is used for this purpose. To avoid conflicts with application-level WebApplicationContexts, the delivery framework initializes its own isolated ApplicationContexts. It loads bean configurations from specific classpath resources and allows bean overriding from designated locations.
The delivery framework loads bean configurations using org.hippoecm.hst.site.container.HstContextLoaderListener (configured in web.xml). Configuration files are loaded from the following classpath locations (packaged in hst-core-x.x.x.jar):
-
classpath:org/hippoecm/hst/site/container/SpringComponentManager.xml -
classpath:org/hippoecm/hst/site/container/SpringComponentManager-*.xml
Default configuration properties are read from classpath:org/hippoecm/hst/site/container/SpringComponentManager.properties. You can override these properties using hst-properties files. For details, see HST Container Configuration.
Overriding or Extending Internal Components
You can override existing container components or add custom components in your web application. Refer to HST Core Spring Extension Points for a list of Spring beans that are considered SPIs and are safe to override. Avoid overriding beans not listed as SPI, as their interfaces may change between releases.
Add overriding or custom bean definitions in:
classpath:META-INF/hst-assembly/overrides/*.xml
Note: In a typical Maven-based project, place these XML files in
src/main/resources/META-INF/hst-assembly/overrides/within thesite/componentsmodule.
Accessing Internal Components
Access internal container components through org.hippoecm.hst.core.container.ComponentManager.
For example, to obtain a JCR session from the internal session pooling repository component:
import javax.jcr.Repository; import javax.jcr.Session; import javax.jcr.Credentials; import org.hippoecm.hst.site.HstServices; import org.hippoecm.hst.core.container.ComponentManager; public class Example { public void doIt() throws Exception { Session session = null; try { // Obtain the ComponentManager initialized by the delivery framework ComponentManager componentManager = HstServices.getComponentManager(); // Retrieve internal components by bean name Credentials liveSiteCreds = componentManager.getComponent("javax.jcr.Credentials.default"); Repository repository = componentManager.getComponent("javax.jcr.Repository"); // Acquire a JCR session from the pooling repository component session = repository.login(liveSiteCreds); // Use the session as needed // ... } finally { if (session != null) { // Return the JCR session to the pool session.logout(); } } } }
For a list of Spring beans that are considered APIs and safe to use, see HST Core Spring Extension Points. Avoid using beans not explicitly listed as API, as their stability is not guaranteed across releases.
Event Communication with ComponentManager
The ComponentManager provides a simple publish-subscribe event communication mechanism between components. For details, see HST Spring ComponentManager event publishing.
Summary
Bloomreach Content's delivery framework uses core features of the Spring Framework, such as Dependency Injection and Aspect-Oriented Programming, to manage internal components. It initializes isolated ApplicationContexts by loading bean configurations from specific classpath resources and supports bean overriding from defined locations. This approach keeps internal component management separate from application-level contexts.
The framework enables you to override or extend container components, add custom components, and use publish-subscribe event communication between components. For more information on extension points and configuration, refer to the linked documentation.