From 9983280c8d0196ec56ab1c0b4b54047a6333e13e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=E5=BA=B7?= Date: Sat, 29 Dec 2018 16:12:46 +0800 Subject: [PATCH] config server init ... --- ....properties => application-dev.properties} | 2 +- tanmguo-config-server/pom.xml | 67 ++++++++++++++ .../ConfigServerApplication.java | 22 +++++ .../src/main/resources/bootstrap.yml | 24 +++++ .../tanmguo-config-server.iml | 91 +++++++++++++++++++ .../target/classes/bootstrap.yml | 24 +++++ 6 files changed, 229 insertions(+), 1 deletion(-) rename tamguo/src/main/resources/{application.properties => application-dev.properties} (97%) create mode 100644 tanmguo-config-server/pom.xml create mode 100644 tanmguo-config-server/src/main/java/com.tamguo.config/ConfigServerApplication.java create mode 100644 tanmguo-config-server/src/main/resources/bootstrap.yml create mode 100644 tanmguo-config-server/tanmguo-config-server.iml create mode 100644 tanmguo-config-server/target/classes/bootstrap.yml diff --git a/tamguo/src/main/resources/application.properties b/tamguo/src/main/resources/application-dev.properties similarity index 97% rename from tamguo/src/main/resources/application.properties rename to tamguo/src/main/resources/application-dev.properties index 28c8229..ab00b4f 100644 --- a/tamguo/src/main/resources/application.properties +++ b/tamguo/src/main/resources/application-dev.properties @@ -13,7 +13,7 @@ spring.datasource.maxPoolPreparedStatementPerConnectionSize=20 spring.datasource.maxWait=60000 spring.datasource.minEvictableIdleTimeMillis=300000 spring.datasource.minIdle=5 -spring.datasource.password=Tanguo +spring.datasource.password=admin spring.datasource.poolPreparedStatements=true spring.datasource.testOnBorrow=false spring.datasource.testOnReturn=false diff --git a/tanmguo-config-server/pom.xml b/tanmguo-config-server/pom.xml new file mode 100644 index 0000000..ba334e7 --- /dev/null +++ b/tanmguo-config-server/pom.xml @@ -0,0 +1,67 @@ + + + 4.0.0 + com.tamguo + tanmguo-config-server + 1.0.0 + + + org.springframework.boot + spring-boot-starter-parent + 2.0.1.RELEASE + + + + + + org.springframework.cloud + spring-cloud-dependencies + Finchley.RELEASE + pom + import + + + + + + + org.springframework.cloud + spring-cloud-starter-config + + + + org.springframework.cloud + spring-cloud-config-server + + + + org.springframework.boot + spring-boot-starter-actuator + + + + org.springframework.cloud + spring-cloud-starter-eureka + + + + org.projectlombok + lombok + + + + + + tamguo-config-server + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + \ No newline at end of file diff --git a/tanmguo-config-server/src/main/java/com.tamguo.config/ConfigServerApplication.java b/tanmguo-config-server/src/main/java/com.tamguo.config/ConfigServerApplication.java new file mode 100644 index 0000000..6536875 --- /dev/null +++ b/tanmguo-config-server/src/main/java/com.tamguo.config/ConfigServerApplication.java @@ -0,0 +1,22 @@ +package com.tamguo.config; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.boot.CommandLineRunner; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.config.server.EnableConfigServer; + +@SpringBootApplication +@EnableConfigServer +@Slf4j +public class ConfigServerApplication implements CommandLineRunner{ + + public static void main(String[] args) { + SpringApplication.run(ConfigServerApplication.class, args); + } + + @Override + public void run(String... args) throws Exception { + log.info(">>>>>>>>>>>>>>> tamguo-config-server 启动完成<<<<<<<<<<<<<"); + } +} diff --git a/tanmguo-config-server/src/main/resources/bootstrap.yml b/tanmguo-config-server/src/main/resources/bootstrap.yml new file mode 100644 index 0000000..86b8e02 --- /dev/null +++ b/tanmguo-config-server/src/main/resources/bootstrap.yml @@ -0,0 +1,24 @@ +server: + port: 9999 +spring: + application: + name: tamguo-config-server + cloud: + config: + allowOverride: true + server: + git: + uri: https://gitee.com/zhangshukang/tamguo-config-server-repo.git + username: 434329122@qq.com + password: + search-paths: tamguo + fail-fast: true + override-none: true #覆盖非系统属性 true不覆盖 + override-system-properties: true #覆盖系统属性 false不覆盖 + + + +logging: + level: + root: info + diff --git a/tanmguo-config-server/tanmguo-config-server.iml b/tanmguo-config-server/tanmguo-config-server.iml new file mode 100644 index 0000000..90d3fc7 --- /dev/null +++ b/tanmguo-config-server/tanmguo-config-server.iml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tanmguo-config-server/target/classes/bootstrap.yml b/tanmguo-config-server/target/classes/bootstrap.yml new file mode 100644 index 0000000..25bfd63 --- /dev/null +++ b/tanmguo-config-server/target/classes/bootstrap.yml @@ -0,0 +1,24 @@ +server: + port: 9999 +spring: + application: + name: tamguo-config-server + cloud: + config: + allowOverride: true + server: + git: + uri: https://gitee.com/zhangshukang/tamguo-config-server-repo.git + username: 434329122@qq.com + password: zklovecjj801122 + search-paths: tamguo + fail-fast: true + override-none: true #覆盖非系统属性 true不覆盖 + override-system-properties: true #覆盖系统属性 false不覆盖 + + + +logging: + level: + root: info +