mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-07-15 01:07:30 +08:00
Refine check
Refine commit 8a96481
to set the web environment to false if spring web
is not available in the classpath. Thanks to @mjustin for spotting that
mistake.
Closes gh-3856
This commit is contained in:
parent
426a8dc103
commit
5043c959a2
@ -864,7 +864,7 @@ public class SpringApplication {
|
||||
public void setApplicationContextClass(
|
||||
Class<? extends ConfigurableApplicationContext> applicationContextClass) {
|
||||
this.applicationContextClass = applicationContextClass;
|
||||
if (isSpringWebAvailable() && !WebApplicationContext.class.isAssignableFrom(
|
||||
if (!isSpringWebAvailable() || !WebApplicationContext.class.isAssignableFrom(
|
||||
applicationContextClass)) {
|
||||
this.webEnvironment = false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user