diff --git a/Chapter9-1-4/config-server/pom.xml b/Chapter9-1-4/config-server/pom.xml new file mode 100644 index 0000000..379aa99 --- /dev/null +++ b/Chapter9-1-4/config-server/pom.xml @@ -0,0 +1,62 @@ + + + 4.0.0 + + com.didispace + config-server + 1.0.0 + jar + + config-server + Spring Cloud project + + + org.springframework.boot + spring-boot-starter-parent + 1.3.5.RELEASE + + + + + UTF-8 + 1.8 + + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + org.springframework.cloud + spring-cloud-config-server + + + + + + + + org.springframework.cloud + spring-cloud-dependencies + Brixton.RELEASE + pom + import + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + \ No newline at end of file diff --git a/Chapter9-1-4/config-server/src/main/java/com/didispace/Application.java b/Chapter9-1-4/config-server/src/main/java/com/didispace/Application.java new file mode 100644 index 0000000..a2e140c --- /dev/null +++ b/Chapter9-1-4/config-server/src/main/java/com/didispace/Application.java @@ -0,0 +1,15 @@ +package com.didispace; + +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.builder.SpringApplicationBuilder; +import org.springframework.cloud.config.server.EnableConfigServer; + +@EnableConfigServer +@SpringBootApplication +public class Application { + + public static void main(String[] args) { + new SpringApplicationBuilder(Application.class).web(true).run(args); + } + +} diff --git a/Chapter9-1-4/config-server/src/main/resources/application.properties b/Chapter9-1-4/config-server/src/main/resources/application.properties new file mode 100644 index 0000000..c088c4c --- /dev/null +++ b/Chapter9-1-4/config-server/src/main/resources/application.properties @@ -0,0 +1,6 @@ +server.port=7001 + +spring.application.name=config-server +spring.profiles.active=native + +#spring.cloud.config.server.git.uri=file://${user.home}/config-repo diff --git a/Chapter9-1-4/config-server/src/main/resources/test.yml b/Chapter9-1-4/config-server/src/main/resources/test.yml new file mode 100644 index 0000000..5307614 --- /dev/null +++ b/Chapter9-1-4/config-server/src/main/resources/test.yml @@ -0,0 +1,2 @@ +my: + otherprop: myotherval \ No newline at end of file