Forces web-application-type=none in ContextRefresher.

This allows apps with spring.main.web-application-type={REACTIVE|SERVLET} to function properly without error.

fixes gh-678
This commit is contained in:
Spencer Gibb
2020-01-27 17:06:04 -05:00
parent 2ddcd6c4ce
commit b10e449279
7 changed files with 394 additions and 0 deletions

View File

@@ -182,6 +182,8 @@ public class ContextRefresher {
Map<String, Object> map = new HashMap<String, Object>();
map.put("spring.jmx.enabled", false);
map.put("spring.main.sources", "");
// gh-678 without this apps with this property set to REACTIVE or SERVLET fail
map.put("spring.main.web-application-type", "NONE");
capturedPropertySources
.addFirst(new MapPropertySource(REFRESH_ARGS_PROPERTY_SOURCE, map));
return environment;