diff --git a/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java b/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java index 3714de17725..e33ab4885a0 100644 --- a/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java +++ b/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java @@ -140,8 +140,8 @@ import org.springframework.web.context.support.StandardServletEnvironment; * Configuration properties are also bound to the {@link SpringApplication}. This makes it * possible to set {@link SpringApplication} properties dynamically, like the sources * ("spring.main.sources" - a CSV list) the flag to indicate a web environment - * ("spring.main.web_environment=true") or the flag to switch off the banner - * ("spring.main.show_banner=false"). + * ("spring.main.web-application-type=none") or the flag to switch off the banner + * ("spring.main.banner-mode=off"). * * @author Phillip Webb * @author Dave Syer @@ -340,7 +340,8 @@ public class SpringApplication { bindToSpringApplication(environment); Banner printedBanner = printBanner(environment); context = createApplicationContext(); - exceptionReporters = getSpringFactoriesInstances(SpringBootExceptionReporter.class, + exceptionReporters = getSpringFactoriesInstances( + SpringBootExceptionReporter.class, new Class[] { ConfigurableApplicationContext.class }, context); prepareContext(context, environment, listeners, applicationArguments, printedBanner); @@ -854,7 +855,8 @@ public class SpringApplication { private void handleRunFailure(ConfigurableApplicationContext context, SpringApplicationRunListeners listeners, - Collection exceptionReporters, Throwable exception) { + Collection exceptionReporters, + Throwable exception) { try { try { handleExitCode(context, exception); diff --git a/spring-boot/src/main/java/org/springframework/boot/diagnostics/AbstractFailureAnalyzer.java b/spring-boot/src/main/java/org/springframework/boot/diagnostics/AbstractFailureAnalyzer.java index 8808292d075..fd48cba9c2e 100644 --- a/spring-boot/src/main/java/org/springframework/boot/diagnostics/AbstractFailureAnalyzer.java +++ b/spring-boot/src/main/java/org/springframework/boot/diagnostics/AbstractFailureAnalyzer.java @@ -59,10 +59,10 @@ public abstract class AbstractFailureAnalyzer } @SuppressWarnings("unchecked") - protected final T findCause(Throwable failure, Class type) { + protected final E findCause(Throwable failure, Class type) { while (failure != null) { if (type.isInstance(failure)) { - return (T) failure; + return (E) failure; } failure = failure.getCause(); } diff --git a/spring-boot/src/main/java/org/springframework/boot/env/PropertySourcesLoader.java b/spring-boot/src/main/java/org/springframework/boot/env/PropertySourcesLoader.java index 2b394e64c89..81057c6cf28 100644 --- a/spring-boot/src/main/java/org/springframework/boot/env/PropertySourcesLoader.java +++ b/spring-boot/src/main/java/org/springframework/boot/env/PropertySourcesLoader.java @@ -33,7 +33,7 @@ import org.springframework.util.Assert; import org.springframework.util.StringUtils; /** - * Utility that can be used to {@link MutablePropertySources} using + * Utility that can be used update {@link MutablePropertySources} using * {@link PropertySourceLoader}s. * * @author Phillip Webb