BAEL-579 Added actuator to Cloud Config Client.
This commit is contained in:
parent
f775bf91e5
commit
076657a26a
@ -29,6 +29,10 @@
|
|||||||
<version>${org.springframework.boot.version}</version>
|
<version>${org.springframework.boot.version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-actuator</artifactId>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
@ -3,6 +3,7 @@ package com.baeldung.spring.cloud.config.client;
|
|||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
import org.springframework.cloud.context.config.annotation.RefreshScope;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
@ -11,6 +12,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
@RestController
|
@RestController
|
||||||
|
@RefreshScope
|
||||||
public class ConfigClient {
|
public class ConfigClient {
|
||||||
@Value("${user.role}")
|
@Value("${user.role}")
|
||||||
private String role;
|
private String role;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user