RefreshScope Runtime Configuration Without Spring Cloud Config Server

后端 未结 1 615
情话喂你
情话喂你 2021-01-23 20:27

Is it possible to refresh property(api-url) through POST rest api /refresh call using @RefreshScope without having setup of spring cloud config server and spring cloud config cl

相关标签:
1条回答
  • 2021-01-23 21:02

    Yes, just include spring cloud starter

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.5.2.RELEASE</version>
    </parent>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>Dalston.RELEASE</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter</artifactId>
        </dependency>
    </dependencies>
    
    0 讨论(0)
提交回复
热议问题