Created
December 16, 2018 20:14
-
-
Save kamisrini/0575374e608b7cbf658611a4704a79b8 to your computer and use it in GitHub Desktop.
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
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.web.bind.annotation.RequestMapping; | |
import org.springframework.web.bind.annotation.RestController; | |
@SpringBootApplication | |
public class AiMainAppApplication { | |
public static void main(String[] args) { | |
SpringApplication.run(AiMainAppApplication.class, args); | |
} | |
} | |
@RefreshScope | |
@RestController | |
class MessageRestController { | |
@Value("${message:Hello from local}") | |
private String message; | |
@RequestMapping("/message") | |
String getMessage() { | |
return this.message; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment