兼容war启动

This commit is contained in:
smallchill 2019-01-04 09:34:52 +08:00
parent bd07693a51
commit 53637a3e5b

View File

@ -47,7 +47,7 @@ public class BladeApplication {
return builder.run(args); return builder.run(args);
} }
private static SpringApplicationBuilder createSpringApplicationBuilder(String appName, Class source, String... args) { public static SpringApplicationBuilder createSpringApplicationBuilder(String appName, Class source, String... args) {
Assert.hasText(appName, "[appName]服务名不能为空"); Assert.hasText(appName, "[appName]服务名不能为空");
// 读取环境变量使用spring boot的规则 // 读取环境变量使用spring boot的规则
ConfigurableEnvironment environment = new StandardEnvironment(); ConfigurableEnvironment environment = new StandardEnvironment();
@ -108,7 +108,7 @@ public class BladeApplication {
* *
* @return boolean * @return boolean
*/ */
private static boolean isLocalDev() { public static boolean isLocalDev() {
String osName = System.getProperty("os.name"); String osName = System.getProperty("os.name");
return StringUtils.hasText(osName) && !(AppConstant.OS_NAME_LINUX.equals(osName.toUpperCase())); return StringUtils.hasText(osName) && !(AppConstant.OS_NAME_LINUX.equals(osName.toUpperCase()));
} }