<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                [TOC] ~~~ public SpringApplication(Class<?>... primarySources) { this(null, primarySources); } @SuppressWarnings({ "unchecked", "rawtypes" }) public SpringApplication(ResourceLoader resourceLoader, Class<?>... primarySources) { this.resourceLoader = resourceLoader; //判斷primarySources不能為空 Assert.notNull(primarySources, "PrimarySources must not be null"); //將primarySources放入SpringApplication的全局變量primarySources,Set集合中 this.primarySources = new LinkedHashSet<>(Arrays.asList(primarySources)); //從類路徑中推斷應用程序類型放到SpringApplication的全局變量webApplicationType this.webApplicationType = WebApplicationType.deduceFromClasspath(); //從META-INF/spring.factories文件中獲取ApplicationContextInitializer接口的實現類并利用反射創建對象返回放入SpringApplication的全局變量initializers,List集合中 setInitializers((Collection) getSpringFactoriesInstances( ApplicationContextInitializer.class)); //同上,也是從META-INF/spring.factories文件中獲取ApplicationListener接口的實現類并利用反射創建對象返回放入SpringApplication的全局變量listeners,List集合中 setListeners((Collection) getSpringFactoriesInstances(ApplicationListener.class)); //通過獲取當前調用棧,找到入口方法main所在的類,放入SpringApplication的全局變量mainApplicationClass this.mainApplicationClass = deduceMainApplicationClass(); } ~~~ ~~~ public ConfigurableApplicationContext run(String... args) { //StopWatch是org.springframework.util的工具類,可以用來方便的記錄程序的運行時間 StopWatch stopWatch = new StopWatch(); stopWatch.start(); ConfigurableApplicationContext context = null; Collection<SpringBootExceptionReporter> exceptionReporters = new ArrayList<>(); //設置系統屬性java.awt.headless為true configureHeadlessProperty(); //從META-INF/spring.factories文件中得到SpringApplicationRunListeners接口的所有實現類 //然后通過構造方法創建SpringApplicationRunListeners對象。參數就是獲取到的接口實現類集合 //該對象持有一個SpringApplicationRunListener對象的集合,并且封裝了SpringApplicationRunListener對象對應的方法,方便統一管理Listener SpringApplicationRunListeners listeners = getRunListeners(args); //廣播事件ApplicationStartingEvent listeners.starting(); try { //將args參數進一步封裝成ApplicationArguments ApplicationArguments applicationArguments = new DefaultApplicationArguments( args); //構建環境(Environment) ConfigurableEnvironment environment = prepareEnvironment(listeners, applicationArguments); //設置系統屬性spring.beaninfo.ignore configureIgnoreBeanInfo(environment); //打印banner Banner printedBanner = printBanner(environment); //根據環境類型創建容器 context = createApplicationContext(); //SpringApplication啟動錯誤的自定義報告 exceptionReporters = getSpringFactoriesInstances( SpringBootExceptionReporter.class, new Class[] { ConfigurableApplicationContext.class }, context); //容器準備階段 prepareContext(context, environment, listeners, applicationArguments, printedBanner); //刷新上下文 refreshContext(context); //刷新上下文后調用,擴展接口 afterRefresh(context, applicationArguments); stopWatch.stop(); if (this.logStartupInfo) { new StartupInfoLogger(this.mainApplicationClass) .logStarted(getApplicationLog(), stopWatch); } //發布事件ApplicationStartedEvent listeners.started(context); //回調ApplicationRunner接口以及CommandLineRunner接口的run方法 callRunners(context, applicationArguments); } catch (Throwable ex) { //發布ApplicationFailedEvent、ExitCodeEvent事件,異常報告 handleRunFailure(context, ex, exceptionReporters, listeners); throw new IllegalStateException(ex); } try { //發布事件ApplicationReadyEvent listeners.running(context); } catch (Throwable ex) { handleRunFailure(context, ex, exceptionReporters, null); throw new IllegalStateException(ex); } return context; } ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看