1. 引入 Spring Cloud Sentinel,后续做进一步集成
2. 重新搭建 Elasticsearch 服务,并接入 search 服务
This commit is contained in:
@@ -15,12 +15,12 @@
|
||||
<!-- Mall 相关 -->
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.mall</groupId>
|
||||
<artifactId>search-service-api</artifactId>
|
||||
<artifactId>mall-spring-boot</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.mall</groupId>
|
||||
<artifactId>mall-spring-boot</artifactId>
|
||||
<artifactId>search-service-api</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
# es
|
||||
spring:
|
||||
application:
|
||||
name: search-application
|
||||
data:
|
||||
elasticsearch:
|
||||
cluster-name: elasticsearch
|
||||
cluster-nodes: 180.167.213.26:9300
|
||||
cluster-nodes: s1.iocoder.cn:9300
|
||||
repositories:
|
||||
enable: true
|
||||
elasticsearch:
|
||||
rest:
|
||||
uris: s1.iocoder.cn:9200
|
||||
|
||||
# Spring Cloud 配置项
|
||||
cloud:
|
||||
@@ -44,6 +49,6 @@ dubbo:
|
||||
|
||||
# rocketmq
|
||||
rocketmq:
|
||||
name-server: 127.0.0.1:9876
|
||||
name-server: s1.iocoder.cn:9876
|
||||
producer:
|
||||
group: search-producer-group
|
||||
|
||||
@@ -16,6 +16,10 @@ public class ProductSearchServiceImplTest {
|
||||
@Autowired
|
||||
private ProductRepository productRepository;
|
||||
|
||||
static {
|
||||
System.setProperty("es.set.netty.runtime.available.processors", "false");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testRebuild() {
|
||||
int counts = productSearchService.rebuild();
|
||||
|
||||
Reference in New Issue
Block a user