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:
@@ -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");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user