|
@@ -27,10 +27,6 @@ import java.util.Properties;
|
|
|
@Configuration
|
|
|
@Slf4j
|
|
|
public class EsConfig {
|
|
|
- @Value("${ElasticSearch.host}")
|
|
|
- private String host;
|
|
|
- @Value("${ElasticSearch.port}")
|
|
|
- private Integer port;
|
|
|
@Value("${ElasticSearch.userFilePath}")
|
|
|
private String userFilePath;
|
|
|
|
|
@@ -46,6 +42,8 @@ public class EsConfig {
|
|
|
}
|
|
|
String username = properties.getProperty("username");
|
|
|
String password = properties.getProperty("password");
|
|
|
+ String host = properties.getProperty("host");
|
|
|
+ int port = Integer.parseInt(properties.getProperty("port"));
|
|
|
|
|
|
RestClientBuilder builder = null;
|
|
|
// 可以指定多个es
|