Document the new local config YAML features
Also remove --git-url command line flag (since you can put it in configserver.yml now).
This commit is contained in:
@@ -138,15 +138,15 @@ public class DeployerThread extends Thread {
|
||||
PropertySource<?> source = null;
|
||||
Resource resource = new ClassPathResource("config" + path, DeployerThread.class);
|
||||
source = loadPropertySource(resource, path);
|
||||
if (source==null) {
|
||||
if (source == null) {
|
||||
resource = new ClassPathResource(path, DeployerThread.class);
|
||||
source = loadPropertySource(resource, path);
|
||||
}
|
||||
if (source==null) {
|
||||
if (source == null) {
|
||||
resource = new FileSystemResource("config" + path);
|
||||
source = loadPropertySource(resource, path);
|
||||
}
|
||||
if (source==null) {
|
||||
if (source == null) {
|
||||
resource = new FileSystemResource("." + path);
|
||||
source = loadPropertySource(resource, path);
|
||||
}
|
||||
@@ -156,8 +156,9 @@ public class DeployerThread extends Thread {
|
||||
private PropertySource<?> loadPropertySource(Resource resource, String path) {
|
||||
if (resource.exists()) {
|
||||
try {
|
||||
PropertySource<?> source = new YamlPropertySourceLoader().load(path, resource, null);
|
||||
if (source!=null) {
|
||||
PropertySource<?> source = new YamlPropertySourceLoader().load(path,
|
||||
resource, null);
|
||||
if (source != null) {
|
||||
logger.info("Loaded YAML properties from: " + resource);
|
||||
}
|
||||
return source;
|
||||
@@ -261,12 +262,6 @@ public class DeployerThread extends Thread {
|
||||
for (String key : map.keySet()) {
|
||||
appDefProps.put(key, map.get(key));
|
||||
}
|
||||
if (deployable.getName().equals("configserver")
|
||||
&& environment.containsProperty("git.uri")) {
|
||||
appDefProps.put("spring.profiles.active", "git");
|
||||
appDefProps.put("spring.cloud.config.server.git.uri",
|
||||
environment.getRequiredProperty("git.uri"));
|
||||
}
|
||||
|
||||
AppDefinition definition = new AppDefinition(deployable.getName(), appDefProps);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user