BAEL-579 Added actuator to Cloud Config Client.
This commit is contained in:
		
							parent
							
								
									f775bf91e5
								
							
						
					
					
						commit
						076657a26a
					
				| @ -1,47 +1,51 @@ | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
| <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||||
|     xmlns="http://maven.apache.org/POM/4.0.0" | ||||
|     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||||
|     <modelVersion>4.0.0</modelVersion> | ||||
| 	xmlns="http://maven.apache.org/POM/4.0.0" | ||||
| 	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||||
| 	<modelVersion>4.0.0</modelVersion> | ||||
| 
 | ||||
|     <parent> | ||||
|         <groupId>com.baeldung.spring.cloud</groupId> | ||||
|         <artifactId>spring-cloud-config</artifactId> | ||||
|         <version>1.0-SNAPSHOT</version> | ||||
|     </parent> | ||||
|     <artifactId>client</artifactId> | ||||
| 	<parent> | ||||
| 		<groupId>com.baeldung.spring.cloud</groupId> | ||||
| 		<artifactId>spring-cloud-config</artifactId> | ||||
| 		<version>1.0-SNAPSHOT</version> | ||||
| 	</parent> | ||||
| 	<artifactId>client</artifactId> | ||||
| 
 | ||||
|     <dependencies> | ||||
|         <dependency> | ||||
|             <groupId>org.springframework.cloud</groupId> | ||||
|             <artifactId>spring-cloud-starter-config</artifactId> | ||||
|             <version>${spring-cloud-starter-config.version}</version> | ||||
|         </dependency> | ||||
|         <dependency> | ||||
|             <groupId>org.springframework.boot</groupId> | ||||
|             <artifactId>spring-boot-starter-web</artifactId> | ||||
|             <version>${org.springframework.boot.version}</version> | ||||
|         </dependency> | ||||
| 	<dependencies> | ||||
| 		<dependency> | ||||
| 			<groupId>org.springframework.cloud</groupId> | ||||
| 			<artifactId>spring-cloud-starter-config</artifactId> | ||||
| 			<version>${spring-cloud-starter-config.version}</version> | ||||
| 		</dependency> | ||||
| 		<dependency> | ||||
| 			<groupId>org.springframework.boot</groupId> | ||||
| 			<artifactId>spring-boot-starter-web</artifactId> | ||||
| 			<version>${org.springframework.boot.version}</version> | ||||
| 		</dependency> | ||||
| 
 | ||||
|         <dependency> | ||||
|             <groupId>org.springframework.boot</groupId> | ||||
|             <artifactId>spring-boot-starter-test</artifactId> | ||||
|             <version>${org.springframework.boot.version}</version> | ||||
|             <scope>test</scope> | ||||
|         </dependency> | ||||
|     </dependencies> | ||||
| 		<dependency> | ||||
| 			<groupId>org.springframework.boot</groupId> | ||||
| 			<artifactId>spring-boot-starter-test</artifactId> | ||||
| 			<version>${org.springframework.boot.version}</version> | ||||
| 			<scope>test</scope> | ||||
| 		</dependency> | ||||
| 		<dependency> | ||||
| 			<groupId>org.springframework.boot</groupId> | ||||
| 			<artifactId>spring-boot-actuator</artifactId> | ||||
| 		</dependency> | ||||
| 	</dependencies> | ||||
| 
 | ||||
|     <build> | ||||
|         <plugins> | ||||
|             <plugin> | ||||
|                 <groupId>org.springframework.boot</groupId> | ||||
|                 <artifactId>spring-boot-maven-plugin</artifactId> | ||||
|             </plugin> | ||||
|         </plugins> | ||||
|     </build> | ||||
| 	<build> | ||||
| 		<plugins> | ||||
| 			<plugin> | ||||
| 				<groupId>org.springframework.boot</groupId> | ||||
| 				<artifactId>spring-boot-maven-plugin</artifactId> | ||||
| 			</plugin> | ||||
| 		</plugins> | ||||
| 	</build> | ||||
| 
 | ||||
|     <properties> | ||||
|         <spring-cloud-starter-config.version>1.2.2.RELEASE</spring-cloud-starter-config.version> | ||||
|         <org.springframework.boot.version>1.4.2.RELEASE</org.springframework.boot.version> | ||||
|     </properties> | ||||
| 	<properties> | ||||
| 		<spring-cloud-starter-config.version>1.2.2.RELEASE</spring-cloud-starter-config.version> | ||||
| 		<org.springframework.boot.version>1.4.2.RELEASE</org.springframework.boot.version> | ||||
| 	</properties> | ||||
| </project> | ||||
|  | ||||
| @ -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; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user