org.springframework.boot.diagnostics

Class FailureAnalyzers



  • public final class FailureAnalyzers
    extends Object
    Utility to trigger FailureAnalyzer and FailureAnalysisReporter instances loaded from spring.factories.

    A FailureAnalyzer that requires access to the BeanFactory in order to perform its analysis can implement BeanFactoryAware to have the BeanFactory injected prior to FailureAnalyzer.analyze(Throwable) being called.

    Since:
    1.4.0
    Author:
    Andy Wilkinson, Phillip Webb, Stephane Nicoll
    • Constructor Detail

      • FailureAnalyzers

        public FailureAnalyzers(org.springframework.context.ConfigurableApplicationContext context)
        Create a new FailureAnalyzers instance.
        Parameters:
        context - the source application context
        Since:
        1.4.1
    • Method Detail

      • analyzeAndReport

        public boolean analyzeAndReport(Throwable failure)
        Analyze and report the specified failure.
        Parameters:
        failure - the failure to analyze
        Returns:
        true if the failure was handled
      • analyzeAndReport

        @Deprecated
        public static boolean analyzeAndReport(Throwable failure,
                                                           ClassLoader classLoader,
                                                           org.springframework.context.ConfigurableApplicationContext context)
        Deprecated. as of 1.4.1 in favor of analyzeAndReport(Throwable)
        Analyze and report the specified failure.
        Parameters:
        failure - the failure to analyze
        classLoader - the classloader to use
        context - the context to use
        Returns:
        true if the failure was handled

Copyright © 2017 Pivotal Software, Inc.. All rights reserved.