Rename live properties parser
This commit is contained in:
@@ -43,7 +43,7 @@ import org.json.JSONObject;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.ide.vscode.commons.boot.app.cli.livebean.LiveBeansModel;
|
||||
import org.springframework.ide.vscode.commons.boot.app.cli.liveproperties.LiveEnvJsonParser;
|
||||
import org.springframework.ide.vscode.commons.boot.app.cli.liveproperties.LivePropertiesJsonParser;
|
||||
import org.springframework.ide.vscode.commons.boot.app.cli.liveproperties.LiveProperties;
|
||||
import org.springframework.ide.vscode.commons.boot.app.cli.requestmappings.Boot1xRequestMapping;
|
||||
import org.springframework.ide.vscode.commons.boot.app.cli.requestmappings.RequestMapping;
|
||||
@@ -631,7 +631,7 @@ public abstract class AbstractSpringBootApp implements SpringBootApp {
|
||||
try {
|
||||
String envJson = getEnvironment();
|
||||
if (envJson != null) {
|
||||
return LiveEnvJsonParser.parseProperties(envJson);
|
||||
return LivePropertiesJsonParser.parseProperties(envJson);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("error resolving live properties from environment endpoint", e);
|
||||
|
||||
@@ -15,7 +15,7 @@ import java.util.List;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
public abstract class LiveEnvJsonParser {
|
||||
public abstract class LivePropertiesJsonParser {
|
||||
|
||||
/**
|
||||
* Parse live properties from the given JSON input. Returns null if no live
|
||||
@@ -44,10 +44,10 @@ public abstract class LiveEnvJsonParser {
|
||||
protected abstract List<LivePropertySource> readProperties(JSONObject envObj) throws Exception;
|
||||
|
||||
public static LiveProperties parseProperties(String jsonInput) throws Exception {
|
||||
LiveEnvJsonParser2x boot2x = new LiveEnvJsonParser2x();
|
||||
LivePropertiesJsonParser2x boot2x = new LivePropertiesJsonParser2x();
|
||||
LiveProperties properties = boot2x.parse(jsonInput);
|
||||
if (properties == null) {
|
||||
LiveEnvJsonParser1x boot1x = new LiveEnvJsonParser1x();
|
||||
LivePropertiesJsonParser1x boot1x = new LivePropertiesJsonParser1x();
|
||||
properties = boot1x.parse(jsonInput);
|
||||
}
|
||||
return properties;
|
||||
@@ -17,9 +17,9 @@ import org.json.JSONObject;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
public class LiveEnvJsonParser1x extends LiveEnvJsonParser {
|
||||
public class LivePropertiesJsonParser1x extends LivePropertiesJsonParser {
|
||||
|
||||
public LiveEnvJsonParser1x() {
|
||||
public LivePropertiesJsonParser1x() {
|
||||
|
||||
}
|
||||
|
||||
@@ -19,9 +19,9 @@ import org.json.JSONObject;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
public class LiveEnvJsonParser2x extends LiveEnvJsonParser {
|
||||
public class LivePropertiesJsonParser2x extends LivePropertiesJsonParser {
|
||||
|
||||
public LiveEnvJsonParser2x() {
|
||||
public LivePropertiesJsonParser2x() {
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user