?if (this.webApplicationType == WebApplicationType.SERVLET) { ? ? ? ?return new StandardServletEnvironment(); ? ?} ? ?return new StandardEnvironment();}
枚舉類WebApplicationType是SpringBoot2新增的特性