Created
February 21, 2019 13:53
-
-
Save melardev/4e25e7365415e2e1cbaaaf6acbfc7127 to your computer and use it in GitHub Desktop.
Spring Cloud Rest app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.melardev.cloud.rest.controllers; | |
import org.springframework.beans.factory.annotation.Value; | |
import org.springframework.web.bind.annotation.GetMapping; | |
import org.springframework.web.bind.annotation.RestController; | |
@RestController | |
public class HomeController { | |
@Value("${app.id}") | |
String instance; | |
@GetMapping("/") | |
public String hi() { | |
return "Welcome, I am " + instance; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment