BAEL-579 Added actuator to Cloud Config Client.

This commit is contained in:
iaforek 2017-07-04 17:39:33 +01:00
parent f775bf91e5
commit 076657a26a
2 changed files with 82 additions and 76 deletions

View File

@ -29,6 +29,10 @@
<version>${org.springframework.boot.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-actuator</artifactId>
</dependency>
</dependencies>
<build>

View File

@ -3,6 +3,7 @@ package com.baeldung.spring.cloud.config.client;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
@ -11,6 +12,7 @@ import org.springframework.web.bind.annotation.RestController;
@SpringBootApplication
@RestController
@RefreshScope
public class ConfigClient {
@Value("${user.role}")
private String role;