Commit c017848d authored by Bill Wang's avatar Bill Wang
Browse files

fix type

parent 27fbe3fc
...@@ -76,9 +76,9 @@ public class ElasticRepositoryImpl implements IElasticRepository { ...@@ -76,9 +76,9 @@ public class ElasticRepositoryImpl implements IElasticRepository {
host = provider.getParameterAsString(hostParameter); host = provider.getParameterAsString(hostParameter);
port = Integer.parseInt(provider.getParameterAsString(portParameter)); port = Integer.parseInt(provider.getParameterAsString(portParameter));
Type mapType = new TypeToken<Map<String, String>>(){}.getType(); Type mapType = new TypeToken<Map<String, String>>(){}.getType();
Map<String, String[]> val = new Gson().fromJson(provider.getParameterAsString(elasticCredentialsSecret), mapType); Map<String, String> val = new Gson().fromJson(provider.getParameterAsString(elasticCredentialsSecret), mapType);
username = val.get("username").toString(); username = val.get("username");
password = val.get("password").toString(); password = val.get("password");
//elastic expects username:password format //elastic expects username:password format
usernameAndPassword = String.format("%s:%s", username, password); usernameAndPassword = String.format("%s:%s", username, password);
......
Supports Markdown
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