public class BootApplication extends Object
| Constructor and Description |
|---|
BootApplication() |
| Modifier and Type | Method and Description |
|---|---|
static org.springframework.context.ConfigurableApplicationContext |
run(org.slf4j.Logger logger,
boolean setDeployEnv,
Class<?> source,
String... args)
Static helper that can be used to run a
SpringApplication from
the specified source using default settings. |
static org.springframework.context.ConfigurableApplicationContext |
run(org.slf4j.Logger logger,
boolean setDeployEnv,
String deployEnvValue,
Class<?> source,
String... args)
Static helper that can be used to run a
SpringApplication from
the specified source using default settings. |
static org.springframework.context.ConfigurableApplicationContext |
run(org.slf4j.Logger logger,
Class<?> source,
String... args)
Static helper that can be used to run a
SpringApplication from
the specified source using default settings. |
static org.springframework.context.ConfigurableApplicationContext |
run(org.slf4j.Logger logger,
String deployEnvValue,
Class<?> source,
String... args)
Static helper that can be used to run a
SpringApplication from
the specified source using default settings. |
static String |
setStartDeployEnv(org.slf4j.Logger logger)
为 Application 设置
DEPLOY_ENV
环境变量,如果环境变量中没有设置,则设置部署的默认环境为:dev |
static String |
setStartDeployEnv(org.slf4j.Logger logger,
String deployEnvValue)
为 Application 设置
DEPLOY_ENV
环境变量,如果环境变量中没有设置,则设置部署的默认环境为:dev |
public static String setStartDeployEnv(org.slf4j.Logger logger, String deployEnvValue)
DEPLOY_ENV
环境变量,如果环境变量中没有设置,则设置部署的默认环境为:dev
会先去检查方法的参数:deployEnvValue,如果是:null或者""
,则再去系统环境变量中查找是否有,如果也没有则设置为:dev
logger - 日志deployEnvValue - 待检查的“部署的默认环境的值”,如果是:null或者
"",则再去系统环境变量中查找是否有,如果也没有则设置为:devpublic static String setStartDeployEnv(org.slf4j.Logger logger)
DEPLOY_ENV
环境变量,如果环境变量中没有设置,则设置部署的默认环境为:devlogger - 日志public static org.springframework.context.ConfigurableApplicationContext run(org.slf4j.Logger logger,
boolean setDeployEnv,
String deployEnvValue,
Class<?> source,
String... args)
SpringApplication from
the specified source using default settings.
启动 Spring boot Application,额外会做下面几件事情:
ApplicationEventTracer ,并注册到
ApplicationContext
setStartDeployEnv(Logger)
logger - 日志setDeployEnv - true/false,是否检查部署的环境变量
setStartDeployEnv(Logger)deployEnvValue - 待检查的“部署的默认环境的值”,如果是:null或者
"",则再去系统环境变量中查找是否有,如果也没有则设置为:devsource - the source to loadargs - the application arguments (usually passed from a Java main
method)ApplicationContextSpringApplication.run(Class, String...)public static org.springframework.context.ConfigurableApplicationContext run(org.slf4j.Logger logger,
Class<?> source,
String... args)
SpringApplication from
the specified source using default settings.
启动 Spring boot Application,额外会做下面几件事情:
ApplicationEventTracer ,并注册到
ApplicationContext
setStartDeployEnv(Logger)
logger - 日志source - the source to loadargs - the application arguments (usually passed from a Java main
method)ApplicationContextSpringApplication.run(Class, String...)public static org.springframework.context.ConfigurableApplicationContext run(org.slf4j.Logger logger,
String deployEnvValue,
Class<?> source,
String... args)
SpringApplication from
the specified source using default settings.
启动 Spring boot Application,额外会做下面几件事情:
ApplicationEventTracer ,并注册到
ApplicationContext
setStartDeployEnv(Logger)
logger - 日志deployEnvValue - 待检查的“部署的默认环境的值”,如果是:null或者
"",则再去系统环境变量中查找是否有,如果也没有则设置为:devsource - the source to loadargs - the application arguments (usually passed from a Java main
method)ApplicationContextSpringApplication.run(Class, String...)public static org.springframework.context.ConfigurableApplicationContext run(org.slf4j.Logger logger,
boolean setDeployEnv,
Class<?> source,
String... args)
SpringApplication from
the specified source using default settings.
启动 Spring boot Application,额外会做下面几件事情:
ApplicationEventTracer ,并注册到
ApplicationContext
setStartDeployEnv(Logger)
logger - 日志setDeployEnv - true/false,是否检查部署的环境变量
setStartDeployEnv(Logger)source - the source to loadargs - the application arguments (usually passed from a Java main
method)ApplicationContextSpringApplication.run(Class, String...)Copyright © 2018–2020 Pivotal Software, Inc.. All rights reserved.