Example usage for org.springframework.beans.factory BeanCreationException getRootCause

List of usage examples for org.springframework.beans.factory BeanCreationException getRootCause

Introduction

In this page you can find the example usage for org.springframework.beans.factory BeanCreationException getRootCause.

Prototype

@Nullable
public Throwable getRootCause() 

Source Link

Document

Retrieve the innermost cause of this exception, if any.

Usage

From source file:com.cisco.cta.taxii.adapter.settings.SettingsConfigurationTest.java

@Test
public void refuseMissingFeedNames() throws Exception {
    try (ConfigurableApplicationContext ctx = context(exclude(validProperties(), "taxiiService.feeds"))) {
        fail("The context creation must fail because of invalid configuration.");
    } catch (BeanCreationException e) {
        assertThat(e.getRootCause(), instanceOf(IllegalStateException.class));
    }//from   www  .  j a  v  a  2  s  . c o m
}