Commit 20d83c89 authored by suhuiguang's avatar suhuiguang

1.升级适配redisxinttiao

parent fab8e387
......@@ -8,7 +8,6 @@ import org.apache.http.impl.client.BasicCredentialsProvider;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestClientBuilder;
import org.elasticsearch.client.RestHighLevelClient;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
......@@ -26,8 +25,7 @@ public class ElasticSearchClientConfig {
@Value("${elasticsearch.password}")
private String password;
@Bean
@Qualifier("highLevelClient")
@Bean(destroyMethod = "close")
public RestHighLevelClient restHighLevelClient() {
final CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
credentialsProvider.setCredentials(AuthScope.ANY,
......
......@@ -1324,12 +1324,6 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
result.setTotal(totle);
} catch (IOException e) {
throw new RuntimeException(e);
} finally {
try {
restHighLevelClient.close();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
return result;
}
......
......@@ -312,12 +312,6 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
result.setTotal(totle);
} catch (IOException e) {
throw new RuntimeException(e);
} finally {
try {
restHighLevelClient.close();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
return result;
......
......@@ -877,12 +877,6 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
result.setTotal(totle);
} catch (IOException e) {
throw new RuntimeException(e);
} finally {
try {
restHighLevelClient.close();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
return result;
......
......@@ -14,7 +14,7 @@ eureka.instance.ip-address=172.16.3.34
## ES properties:
elasticsearch.username=elastic
elasticsearch.password=a123456
spring.elasticsearch.rest.uris=http:/172.16.10.230:9200
spring.elasticsearch.rest.uris=http://172.16.10.230:9200
## unit(h)
alertcall.es.synchrony.time=48
#redis properties:
......
......@@ -26,7 +26,7 @@ public class ElasticSearchClientConfig {
@Value("${elasticsearch.password}")
private String password;
@Bean
@Bean(destroyMethod = "close")
@Qualifier("highLevelClient")
public RestHighLevelClient restHighLevelClient() {
final CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
......
......@@ -1323,12 +1323,6 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
result.setTotal(totle);
} catch (IOException e) {
throw new RuntimeException(e);
} finally {
try {
restHighLevelClient.close();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
return result;
}
......
......@@ -315,12 +315,6 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
result.setTotal(totle);
} catch (IOException e) {
throw new RuntimeException(e);
} finally {
try {
restHighLevelClient.close();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
return result;
......
......@@ -947,12 +947,6 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
result.setTotal(totle);
} catch (IOException e) {
throw new RuntimeException(e);
} finally {
try {
restHighLevelClient.close();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
return result;
......
......@@ -14,7 +14,7 @@ eureka.instance.ip-address=172.16.3.34
## ES properties:
elasticsearch.username=elastic
elasticsearch.password=a123456
spring.elasticsearch.rest.uris=http:/172.16.10.230:9200
spring.elasticsearch.rest.uris=http://172.16.10.230:9200
## unit(h)
alertcall.es.synchrony.time=48
#redis properties:
......
......@@ -8,7 +8,6 @@ import org.apache.http.impl.client.BasicCredentialsProvider;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestClientBuilder;
import org.elasticsearch.client.RestHighLevelClient;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
......@@ -26,7 +25,7 @@ public class ElasticSearchClientConfig {
@Value("${elasticsearch.password}")
private String password;
@Bean
@Bean(destroyMethod = "close")
public RestHighLevelClient restHighLevelClient() {
final CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
credentialsProvider.setCredentials(AuthScope.ANY,
......
......@@ -1323,12 +1323,6 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
result.setTotal(totle);
} catch (IOException e) {
throw new RuntimeException(e);
} finally {
try {
restHighLevelClient.close();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
return result;
}
......
......@@ -313,12 +313,6 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
result.setTotal(totle);
} catch (IOException e) {
throw new RuntimeException(e);
} finally {
try {
restHighLevelClient.close();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
return result;
......
......@@ -878,12 +878,6 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
result.setTotal(totle);
} catch (IOException e) {
throw new RuntimeException(e);
}finally {
try {
restHighLevelClient.close();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
return result;
......
......@@ -14,7 +14,7 @@ eureka.instance.ip-address=172.16.3.34
## ES properties:
elasticsearch.username=elastic
elasticsearch.password=a123456
spring.elasticsearch.rest.uris=http:/172.16.10.230:9200
spring.elasticsearch.rest.uris=http://172.16.10.230:9200
## unit(h)
alertcall.es.synchrony.time=48
#redis properties:
......
......@@ -8,10 +8,10 @@ import org.apache.http.impl.client.BasicCredentialsProvider;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestClientBuilder;
import org.elasticsearch.client.RestHighLevelClient;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import java.util.Arrays;
@Configuration
......@@ -25,7 +25,7 @@ public class ElasticSearchClientConfig {
@Value("${elasticsearch.password}")
private String password;
@Bean
@Bean(destroyMethod = "close")
public RestHighLevelClient restHighLevelClient() {
final CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
credentialsProvider.setCredentials(AuthScope.ANY,
......
......@@ -1324,12 +1324,6 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
result.setTotal(totle);
} catch (IOException e) {
throw new RuntimeException(e);
} finally {
try {
restHighLevelClient.close();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
return result;
}
......
......@@ -314,12 +314,6 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
result.setTotal(totle);
} catch (IOException e) {
throw new RuntimeException(e);
} finally {
try {
restHighLevelClient.close();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
return result;
......
......@@ -876,12 +876,6 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
result.setTotal(totle);
} catch (IOException e) {
throw new RuntimeException(e);
} finally {
try {
restHighLevelClient.close();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
return result;
......
......@@ -15,7 +15,7 @@ eureka.instance.ip-address=172.16.3.34
## ES properties:
elasticsearch.username=elastic
elasticsearch.password=a123456
spring.elasticsearch.rest.uris=http:/172.16.10.230:9200
spring.elasticsearch.rest.uris=http://172.16.10.230:9200
## unit(h)
alertcall.es.synchrony.time=48
#redis properties:
......@@ -27,6 +27,7 @@ spring.redis.lettuce.pool.max-active=200
spring.redis.lettuce.pool.max-wait=-1
spring.redis.lettuce.pool.max-idle=10
spring.redis.lettuce.pool.min-idle=0
spring.redis.mode=cluster
## emqx properties:
emqx.clean-session=false
......
......@@ -8,7 +8,6 @@ import org.apache.http.impl.client.BasicCredentialsProvider;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestClientBuilder;
import org.elasticsearch.client.RestHighLevelClient;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
......@@ -26,8 +25,7 @@ public class ElasticSearchClientConfig {
@Value("${elasticsearch.password}")
private String password;
@Bean
@Qualifier("highLevelClient")
@Bean(destroyMethod = "close")
public RestHighLevelClient restHighLevelClient() {
final CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
credentialsProvider.setCredentials(AuthScope.ANY,
......
......@@ -313,12 +313,6 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
result.setTotal(totle);
} catch (IOException e) {
throw new RuntimeException(e);
} finally {
try {
restHighLevelClient.close();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
return result;
......
......@@ -877,12 +877,6 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
result.setTotal(totle);
} catch (IOException e) {
throw new RuntimeException(e);
} finally {
try {
restHighLevelClient.close();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
return result;
......
......@@ -15,7 +15,7 @@ eureka.instance.ip-address=172.16.3.34
## ES properties:
elasticsearch.username=elastic
elasticsearch.password=a123456
spring.elasticsearch.rest.uris=http:/172.16.10.230:9200
spring.elasticsearch.rest.uris=http://172.16.10.230:9200
## unit(h)
alertcall.es.synchrony.time=48
#redis properties:
......
......@@ -28,6 +28,10 @@
<artifactId>poi-ooxml</artifactId>
<groupId>org.apache.poi</groupId>
</exclusion>
<exclusion>
<groupId>com.yeejoin</groupId>
<artifactId>amos-component-security</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
......@@ -65,6 +69,11 @@
<artifactId>logstash-logback-encoder</artifactId>
<version>6.3</version>
</dependency>
<dependency>
<groupId>com.yeejoin</groupId>
<artifactId>amos-component-security</artifactId>
<version>${amos.version.tzs}</version>
</dependency>
</dependencies>
......
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