Add simple configserver
This commit is contained in:
@@ -7,21 +7,27 @@ import org.springframework.boot.CommandLineRunner;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.config.client.ConfigClientProperties;
|
||||
import org.springframework.core.env.Environment;
|
||||
|
||||
/**
|
||||
* @author Dave Syer
|
||||
*/
|
||||
@SpringBootApplication
|
||||
public class BootstrapDecryptionClientApplication implements CommandLineRunner {
|
||||
|
||||
|
||||
private static Log logger = LogFactory.getLog(BootstrapDecryptionClientApplication.class);
|
||||
|
||||
|
||||
@Autowired
|
||||
private ConfigClientProperties config;
|
||||
|
||||
|
||||
@Autowired
|
||||
private Environment environment;
|
||||
|
||||
@Override
|
||||
public void run(String... args) throws Exception {
|
||||
logger.info("Config Server URI: " + config.getUri());
|
||||
logger.info("Config Server URI: " + this.config.getUri());
|
||||
logger.info("And info.bar: " + this.environment.getProperty("info.bar"));
|
||||
logger.info("And info.spam: " + this.environment.getProperty("info.spam"));
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
spring:
|
||||
application:
|
||||
name: client
|
||||
info:
|
||||
bar: '{cipher}db63f1b828044c38f9fab4cbe4cd2ad508380399e184691902b3c44a38e5189f'
|
||||
Reference in New Issue
Block a user