Commit 04694db6 authored by Bill Wang's avatar Bill Wang
Browse files

update default value of type

parent c13a8ff5
......@@ -50,7 +50,7 @@ public class ElasticRepositoryImpl implements IElasticRepository {
private void postConstruct() throws Exception{
K8sLocalParameterProvider provider = new K8sLocalParameterProvider();
host = provider.getParameterAsStringOrDefault("elasticsearch_host", host);
port = Integer.parseInt(provider.getParameterAsStringOrDefault("elasticsearch_port", port));
port = Integer.parseInt(provider.getParameterAsStringOrDefault("elasticsearch_port", String.valueOf(port)));
Map<String, String>val = provider.getCredentialsAsMap("elasticsearch_credentials");
if (val != null){
username = val.get("username");
......
......@@ -52,7 +52,7 @@ public class ElasticSettingServiceImpl implements IElasticSettingService {
private void postConstruct() throws Exception {
K8sLocalParameterProvider provider = new K8sLocalParameterProvider();
host = provider.getParameterAsStringOrDefault("elasticsearch_host", host);
port = Integer.parseInt(provider.getParameterAsStringOrDefault("elasticsearch_port", port));
port = Integer.parseInt(provider.getParameterAsStringOrDefault("elasticsearch_port", String.valueOf(port)));
Map<String, String>val = provider.getCredentialsAsMap("elasticsearch_credentials");
if (val != null){
username = val.get("username");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment