<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、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                # 68.3 啟動前自定義Environment或ApplicationContext ### 68.3 啟動前自定義Environment或ApplicationContext 每個`SpringApplication`都有`ApplicationListeners`和`ApplicationContextInitializers`,用于自定義上下文(context)或環境(environment)。Spring Boot從`META-INF/spring.factories`下加載很多這樣的內部使用的自定義,有很多方法可以注冊其他的自定義: - 以編程方式為每個應用注冊自定義,通過在`SpringApplication`運行前調用它的`addListeners`和`addInitializers`方法來實現。 - 以聲明方式為每個應用注冊自定義,通過設置`context.initializer.classes`或`context.listener.classes`來實現。 - 以聲明方式為所有應用注冊自定義,通過添加一個`META-INF/spring.factories`并打包成一個jar文件(該應用將它作為一個庫)來實現。 `SpringApplication`會給監聽器(即使是在上下文被創建之前就存在的)發送一些特定的`ApplicationEvents`,然后也會注冊監聽`ApplicationContext`發布的事件的監聽器,查看Spring Boot特性章節中的[Section 23.5, “Application events and listeners”](../IV.%20Spring%20Boot%20features/23.5.%20Application%20events%20and%20listeners.md)可以獲取完整列表。 在應用上下文刷新前使用`EnvironmentPostProcessor`自定義`Environment`是可能的,每個實現都需要注冊到`META-INF/spring.factories`: ``` org.springframework.boot.env.EnvironmentPostProcessor=com.example.YourEnvironmentPostProcessor ```
                  <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>

                              哎呀哎呀视频在线观看