<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、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                ![](https://img.kancloud.cn/3a/98/3a98395d1e5c139c986ef08045fa6498_993x336.jpg) <br/> Config Server 與 Git 建立通信的步驟如下: [TOC] # 1. 在Git新建配置文件 我在Gitee上創建倉庫 config-center,并新建了如下配置文件。 * *`cloud-config-center-3344-dev.yml`* ```yml app: name: cloud-config-client-3344 version: dev-1.0 ``` # 2. 構建配置中心模塊 cloud-config-server-3344 模塊將作為 config 配置中心,即它就是 Config Server 服務端。 <br/> 步驟如下: **1. 構建配置中心模塊:cloud-config-server-3344** **2. 在當前模塊的`pom.xml`中添加 config-server 依賴** ```xml <dependencies> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-config-server</artifactId> </dependency> <!-- eureka-client 不是必須的 --> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId> </dependency> ... </dependencies> ``` **3. 當前模塊的`resources/application.yml`** ```yml server: port: 3344 spring: application: name: cloud-config-center cloud: config: server: git: uri: https://gitee.com/flymini/config-center.git #config-center倉庫的HTTPS地址 search-paths: - config-center #倉庫名 username: xxxx@163.com #郵箱 password: xxxxx$0 #密碼 #default-label: master #默認讀取master分支 label: master #讀取倉庫的master分支 ``` **4. 在當前模塊的啟動類上添加注解`@EnableConfigServer`** ```java @SpringBootApplication @EnableConfigServer public class ConfigCenterMain3344 { public static void main(String[] args) { SpringApplication.run(ConfigCenterMain3344.class, args); } } ``` **5. 測試當前模塊是否與Gitee建立通信** (1)啟動當前模塊。 (2)訪問配置文件:http://localhost:3344/cloud-config-center-3344-dev.yml ,響應內容如下。 ```yml app: name: cloud-config-client-3344 version: dev-1.0 ``` (3)訪問一個不存在的配置文件:http://localhost:3344/cloud-config-center-3344-not.yml ,響應內容如下。 ```yml {} ``` <br/> 通過測試,說明當前模塊已經與Gitee成功建立了通信。 <br/> 讀取規則:官網提供了下面幾種讀取規則。 ``` (1)/{application}/{profile}[/{label}] http://localhost:3344/cloud-config-center-3344/dev/master (2)/{application}-{profile}.yml http://localhost:3344/cloud-config-center-3344-dev.yml (3)/{label)/{application}-{profile}.yml http://localhost:3344/master/cloud-config-center-3344-dev.yml #即使文件是 application.yml, 使用 .properties也可以訪問到 (4)/{application}-{profile}.properties http://localhost:3344/cloud-config-center-3344-dev.properties (5)/{label)/{application}-{profile}.properties http://localhost:3344/master/cloud-config-center-3344-dev.properties ```
                  <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>

                              哎呀哎呀视频在线观看