Created
February 25, 2020 17:44
-
-
Save thinkmicroservices/0d09f7286d35670baeb75f79c8be233e to your computer and use it in GitHub Desktop.
This file contains hidden or 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.thinkmicroservices.ri.spring.web; | |
| import javax.annotation.PostConstruct; | |
| import lombok.extern.slf4j.Slf4j; | |
| import org.springframework.beans.factory.annotation.Value; | |
| import org.springframework.boot.SpringApplication; | |
| import org.springframework.boot.autoconfigure.SpringBootApplication; | |
| import org.springframework.cloud.client.discovery.EnableDiscoveryClient; | |
| @EnableDiscoveryClient | |
| @SpringBootApplication | |
| @Slf4j | |
| public class ContentService { | |
| @Value("${configuration.source:DEFAULT}") | |
| String configSource; | |
| @Value("${spring.application.name:NOT-SET}") | |
| private String serviceName; | |
| public static void main(String[] args) { | |
| SpringApplication.run(ContentService.class, args); | |
| } | |
| @PostConstruct | |
| private void displayInfo() { | |
| log.info("Service-Name:{}, configuration.source={}", serviceName, configSource); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment