Extract config server properties to Java bean

ConfigServerProperties is now used to store global properties
for the config server (like the path prefix and bootstrap flag)
under spring.cloud.config.server.* so git specific ones have
been pushed down to spring.cloud.config.server.git.* (similarly
for git->native).

At the same time introduce spring.cloud.config.server.defaultLabel
for the deafult git label (defaults to "master").

Fixes gh-28
This commit is contained in:
Dave Syer
2014-11-10 08:46:02 +00:00
parent 04b6cd0f13
commit 9d55ef84d0
9 changed files with 80 additions and 11 deletions

View File

@@ -35,7 +35,7 @@ public class ApplicationTests {
ConfigurableApplicationContext context = SpringApplication.run(
org.springframework.cloud.config.server.ConfigServerApplication.class,
"--server.port=" + configPort, "--spring.config.name=server",
"--spring.cloud.config.server.uri=" + repo);
"--spring.cloud.config.server.git.uri=" + repo);
configPort = ((EmbeddedWebApplicationContext) context)
.getEmbeddedServletContainer().getPort();
System.setProperty("config.port", "" + configPort);

View File

@@ -4,7 +4,8 @@ spring:
cloud:
config:
server:
basedir: target/config
git:
basedir: target/config
application:
name: configserver
jmx: