mirror of
https://github.com/chillzhuang/blade-tool
synced 2024-11-14 22:49:33 +08:00
⚡ 调整BladeApplication参数位置
This commit is contained in:
parent
443ee7188d
commit
044e486ac5
@ -44,16 +44,16 @@ public class BladeApplication {
|
||||
* @param source The sources
|
||||
* @return an application context created from the current state
|
||||
*/
|
||||
public static ConfigurableApplicationContext run(String appName, Class source, String... args) {
|
||||
public static ConfigurableApplicationContext run(String appName, Class<?> source, String... args) {
|
||||
SpringApplicationBuilder builder = createSpringApplicationBuilder(appName, source, args);
|
||||
return builder.run(args);
|
||||
}
|
||||
|
||||
public static SpringApplicationBuilder createSpringApplicationBuilder(String appName, Class source, String... args) {
|
||||
return createSpringApplicationBuilder(null, appName, source, args);
|
||||
public static SpringApplicationBuilder createSpringApplicationBuilder(String appName, Class<?> source, String... args) {
|
||||
return createSpringApplicationBuilder(appName, source, null, args);
|
||||
}
|
||||
|
||||
public static SpringApplicationBuilder createSpringApplicationBuilder(SpringApplicationBuilder builder, String appName, Class source, String... args) {
|
||||
public static SpringApplicationBuilder createSpringApplicationBuilder(String appName, Class<?> source, SpringApplicationBuilder builder, String... args) {
|
||||
Assert.hasText(appName, "[appName]服务名不能为空");
|
||||
// 读取环境变量,使用spring boot的规则
|
||||
ConfigurableEnvironment environment = new StandardEnvironment();
|
||||
|
Loading…
Reference in New Issue
Block a user