Class EnvironmentReport

java.lang.Object
com.broadleafcommerce.common.extension.EnvironmentReport
All Implemented Interfaces:
org.springframework.beans.factory.config.BeanFactoryPostProcessor, org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor

public class EnvironmentReport extends Object implements org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor
Emit a report to the console during application startup (near the beginning). The purpose of the report is to assist with troubleshooting configuration issues, especially as they relate to custom FlexPackage combinations in which different services are combined in a single JVM.

Channel Information - This section covers the configuration of Spring Cloud Stream channels encountered during autoconfiguration. The type of channel (input or output), the name, whether or not the channel is enabled, and the reason why are all pieces of information captured here. In some cases, it is expected to have disabled channel bindings (e.g. establishing read/write FlexPackage replicas), so a disabled channel does not automatically indicate a problem. However, paying special note to disabled channels (especially output channels) can help with diagnosing missing async interactions at runtime.

Property Information - This section covers the broadleaf properties configured in the system. These are all the properties that were encountered during startup for the standard Spring lifecycle for this application. Seeing the expected properties and their values can help diagnose configuration mistakes (e.g. if you define a property in the wrong FlexPackage).

The report can be disabled by setting the broadleaf.environment.report.disabled property to true.
  • Field Details

    • enabledPrefixes

      public String[] enabledPrefixes
  • Constructor Details

    • EnvironmentReport

      public EnvironmentReport(org.springframework.core.env.Environment environment)
  • Method Details

    • postProcessBeanDefinitionRegistry

      public void postProcessBeanDefinitionRegistry(org.springframework.beans.factory.support.BeanDefinitionRegistry beanDefinitionRegistry) throws org.springframework.beans.BeansException
      Specified by:
      postProcessBeanDefinitionRegistry in interface org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor
      Throws:
      org.springframework.beans.BeansException
    • postProcessBeanFactory

      public void postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory configurableListableBeanFactory) throws org.springframework.beans.BeansException
      Specified by:
      postProcessBeanFactory in interface org.springframework.beans.factory.config.BeanFactoryPostProcessor
      Throws:
      org.springframework.beans.BeansException
    • outputPropertyInformation

      protected void outputPropertyInformation()
    • outputChannelInformation

      protected void outputChannelInformation()
    • getReportProperties

      public EnvironmentReportProperties getReportProperties()
    • setReportProperties

      public void setReportProperties(EnvironmentReportProperties reportProperties)