SpringBoot run 启动源码分析

Springboot 加载 从main方法开始

SpringApplication.run(Application.class, args);

public static ConfigurableApplicationContext run(Class<?> primarySource, String... args) {
        return run(new Class[]{primarySource}, args);
    }

    public static ConfigurableApplicationContext run(Class<?>[] primarySources, String[] args) {
        return (new SpringApplication(primarySources)).run(args);
    }

加载环境变量

发布了652 篇原创文章 · 获赞 60 · 访问量 48万+

猜你喜欢

转载自blog.csdn.net/wxb880114/article/details/104341586