Mercurial > hg > SpringPlayground
comparison spring-cloud-config-client/src/main/java/de/comline/config/controller/HelloController.java @ 20:452cfefb0e1e default tip
Einfache Spring Application, die ihre config aus dem Spring Cloud Config Server liest
author | Dirk Olmes <dirk.olmes@codedo.de> |
---|---|
date | Thu, 17 Sep 2020 17:25:15 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
19:fe6a57f7a2cf | 20:452cfefb0e1e |
---|---|
1 package de.comline.config.controller; | |
2 | |
3 import org.springframework.beans.factory.annotation.Value; | |
4 import org.springframework.web.bind.annotation.RequestMapping; | |
5 import org.springframework.web.bind.annotation.RestController; | |
6 | |
7 @RestController | |
8 public class HelloController { | |
9 @Value("${greeting:ERROR - No greeting configured}") | |
10 private String greeting; | |
11 | |
12 @RequestMapping("/") | |
13 public String index() { | |
14 return greeting; | |
15 } | |
16 } |