首页 > 技术文章 > SpringCloud-Config

anpeiyong 2019-11-07 15:38 原文

1、概述

    Spring Cloud Config provides server-side and client-side support for externalized configuration in a distributed system.    

2、

    Spring Cloud Config Server

        Spring Cloud Config Server provides an HTTP resource-based API for external configuration.

        Spring Cloud Config Server is embeddable in a Spring Boot application, by using the @EnableConfigServer annotation.      

@SpringBootApplication
@EnableConfigServer
public class ConfigServer {
  public static void main(String[] args) {
    SpringApplication.run(ConfigServer.class, args);
  }
}

        it runs on port 8080 by default,but you can switch it to the more conventional port 8888 in various ways. 

            application.properties中修改server.port: 8888

        

推荐阅读