Skip to content

Commit bb4a035

Browse files
committed
fix: rollback
1 parent 777369c commit bb4a035

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

backend/src/main/java/com/park/utmstack/service/elasticsearch/ElasticsearchService.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import com.utmstack.opensearch_connector.exceptions.OpenSearchException;
1919
import com.utmstack.opensearch_connector.types.ElasticCluster;
2020
import com.utmstack.opensearch_connector.types.IndexSort;
21-
import org.opensearch.client.opensearch.OpenSearchClient;
2221
import org.opensearch.client.opensearch._types.SortOrder;
2322
import org.opensearch.client.opensearch._types.query_dsl.Query;
2423
import org.opensearch.client.opensearch.cat.indices.IndicesRecord;
@@ -57,18 +56,15 @@ public class ElasticsearchService {
5756
private final UtmSpaceNotificationControlService spaceNotificationControlService;
5857
private final OpensearchClientBuilder client;
5958

60-
private final OpenSearchClient openSearchClient;
61-
6259
public ElasticsearchService(ApplicationEventService eventService, UserRepository userRepository,
6360
MailService mailService,
6461
UtmSpaceNotificationControlService spaceNotificationControlService,
65-
OpensearchClientBuilder client, OpenSearchClient openSearchClient) {
62+
OpensearchClientBuilder client) {
6663
this.eventService = eventService;
6764
this.userRepository = userRepository;
6865
this.mailService = mailService;
6966
this.spaceNotificationControlService = spaceNotificationControlService;
7067
this.client = client;
71-
this.openSearchClient = openSearchClient;
7268
}
7369

7470
/**

backend/src/main/java/com/park/utmstack/service/elasticsearch/OpensearchClientBuilder.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import com.park.utmstack.config.Constants;
44
import com.utmstack.opensearch_connector.OpenSearch;
55
import com.utmstack.opensearch_connector.enums.HttpScheme;
6-
import lombok.Getter;
76
import org.slf4j.Logger;
87
import org.slf4j.LoggerFactory;
98
import org.springframework.boot.context.event.ApplicationReadyEvent;
@@ -17,7 +16,6 @@
1716
public class OpensearchClientBuilder {
1817
private static final String CLASSNAME = "OpensearchClientBuilder";
1918
private final Logger log = LoggerFactory.getLogger(OpensearchClientBuilder.class);
20-
@Getter
2119
private OpenSearch client;
2220

2321
@Order(Ordered.HIGHEST_PRECEDENCE)
@@ -38,4 +36,8 @@ public void init() throws Exception {
3836
throw new RuntimeException(msg);
3937
}
4038
}
39+
40+
public OpenSearch getClient() {
41+
return client;
42+
}
4143
}

0 commit comments

Comments
 (0)