A few tweaks that might improve performance on startup

... or couldn't hurt anyway.

1. Extends the definition of a web application for @ConditionalOnWebapp
so that a StandardEnvironment can be used (cutting out JNDI failures
for Environment properties)

2. Doesn't bother using StandardServletEnvironment in integration tests

3. Make the NON_ENUMERABLE_ENUMERABLES in PropertySourcesPropertyValues
static so they only get initialized once (not a huge issue at all)
This commit is contained in:
Dave Syer
2014-09-19 16:02:29 +01:00
parent 6248fc0d60
commit d6165d97dd
3 changed files with 8 additions and 7 deletions

View File

@@ -74,6 +74,11 @@ class OnWebApplicationCondition extends SpringBootCondition {
.match("found web application StandardServletEnvironment");
}
if (context.getResourceLoader() instanceof WebApplicationContext) {
return ConditionOutcome
.match("found web application WebApplicationContext");
}
return ConditionOutcome.noMatch("not a web application");
}