From 4eba60a35d2c35724311795f5a45c515d202d564 Mon Sep 17 00:00:00 2001 From: kklt1996 <18332763730@163.com> Date: Mon, 17 Jul 2017 04:04:55 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E4=B8=AD=E5=BF=83=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E5=AE=8C=E6=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config-server/pom.xml | 66 +++++++++++++++++++ .../server/ConfigServerApplication.java | 14 ++++ .../src/main/resources/application.yml | 10 +++ .../server/ConfigServerApplicationTests.java | 16 +++++ 4 files changed, 106 insertions(+) create mode 100644 config-server/pom.xml create mode 100644 config-server/src/main/java/com/micro/fast/config/server/ConfigServerApplication.java create mode 100644 config-server/src/main/resources/application.yml create mode 100644 config-server/src/test/java/com/micro/fast/config/server/ConfigServerApplicationTests.java diff --git a/config-server/pom.xml b/config-server/pom.xml new file mode 100644 index 0000000..4884a2b --- /dev/null +++ b/config-server/pom.xml @@ -0,0 +1,66 @@ + + + 4.0.0 + + com.micro.fast.config.server + config-server + 0.0.1-SNAPSHOT + jar + + config-server + config-server + + + org.springframework.boot + spring-boot-starter-parent + 1.5.4.RELEASE + + + + + UTF-8 + UTF-8 + 1.8 + Dalston.SR1 + 1.8 + 1.8 + 1.8 + + + + + org.springframework.cloud + spring-cloud-config-server + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + + org.springframework.cloud + spring-cloud-dependencies + ${spring-cloud.version} + pom + import + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + diff --git a/config-server/src/main/java/com/micro/fast/config/server/ConfigServerApplication.java b/config-server/src/main/java/com/micro/fast/config/server/ConfigServerApplication.java new file mode 100644 index 0000000..d75c1dc --- /dev/null +++ b/config-server/src/main/java/com/micro/fast/config/server/ConfigServerApplication.java @@ -0,0 +1,14 @@ +package com.micro.fast.config.server; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.config.server.EnableConfigServer; + +@SpringBootApplication +@EnableConfigServer //开启配置中心相关服务 +public class ConfigServerApplication { + + public static void main(String[] args) { + SpringApplication.run(ConfigServerApplication.class, args); + } +} diff --git a/config-server/src/main/resources/application.yml b/config-server/src/main/resources/application.yml new file mode 100644 index 0000000..12800af --- /dev/null +++ b/config-server/src/main/resources/application.yml @@ -0,0 +1,10 @@ +spring: + application: + name: config-server + cloud: + config: + server: + git: + uri: https://git.oschina.net/kklt1996/config-server/ +server: + port: 10001 \ No newline at end of file diff --git a/config-server/src/test/java/com/micro/fast/config/server/ConfigServerApplicationTests.java b/config-server/src/test/java/com/micro/fast/config/server/ConfigServerApplicationTests.java new file mode 100644 index 0000000..d884e2b --- /dev/null +++ b/config-server/src/test/java/com/micro/fast/config/server/ConfigServerApplicationTests.java @@ -0,0 +1,16 @@ +package com.micro.fast.config.server; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest +public class ConfigServerApplicationTests { + + @Test + public void contextLoads() { + } + +}