suxiaoyang 6 роки тому
батько
коміт
1935c29bea

+ 1 - 2
elasticsearch-jest-starter/readme.md

@ -1,2 +1 @@
1. 因为和jpa兼容的问题,此项目已经整和到elasticsearch-starter中
2. 此依赖不推荐使用
1. 因为和jpa兼容的问题,此项目已经整和到elasticsearch-starter中,此依赖不再推荐使用

+ 13 - 0
elasticsearch-starter/readme.md

@ -0,0 +1,13 @@
1. 该公共包提供了transport和jest的ES服务接口
2. 如果只需要transport请使用elasticsearch-transport-starter
#配置示例
spring:
  elasticsearch:
    cluster-name: jkzl #默认即为elasticsearch  集群名
    cluster-nodes: 172.19.103.45:9300,172.19.103.68:9300 #配置es节点信息,逗号分隔,如果没有指定,则启动ClientNode
    client-transport-sniff: false #是否开启嗅探
    jest:
      uris: http://172.19.103.45:9200,http://172.19.103.68:9200 #jest的uri
      connection-timeout: 60000 #Connection timeout in milliseconds.
      multi-threaded: true #Enable connection requests from multiple execution threads.

+ 2 - 1
elasticsearch-starter/src/main/java/com/yihu/elasticsearch/ElasticSearchPool.java

@ -17,7 +17,8 @@ import java.util.Properties;
/**
 * Pool - ES TransportClient 连接池
 * Created by progr1mmer on 2018/1/4.
 * @author progr1mmer
 * @date Created on 2018/1/4.
 */
@Component
@Scope(ConfigurableBeanFactory.SCOPE_SINGLETON)

+ 2 - 1
elasticsearch-starter/src/main/java/com/yihu/elasticsearch/ElasticSearchUtil.java

@ -49,7 +49,8 @@ import java.util.*;
/**
 * Utils - 主要基于(TransportClient)的搜索工具
 * Created by progr1mmer on 2017/12/2.
 * @author progr1mmer
 * @date Created on 2018/1/4.
 */
@Service
@Scope(ConfigurableBeanFactory.SCOPE_SINGLETON)

+ 2 - 1
elasticsearch-starter/src/main/java/com/yihu/elasticsearch/config/ElasticSearchConfig.java

@ -7,7 +7,8 @@ import javax.annotation.PostConstruct;
/**
 * Config - ES TransportClient 配置
 * Created by progr1mmer on 2017/12/1.
 * @author progr1mmer
 * @date Created on 2017/12/1.
 */
@ConfigurationProperties(prefix = "spring.elasticsearch")
@Configuration

+ 10 - 0
elasticsearch-transport-starter/readme.md

@ -0,0 +1,10 @@
注意!!!!!
1. 该配置和ehr目前的配置稍微有点不同,统一将配置信息放置在spring底下
2. 该工具包只提供了transport的ES服务接口,如果要使用JEST请使用elasticsearch-starter
#配置示例
spring:
  elasticsearch:
    cluster-name: jkzl #默认即为elasticsearch  集群名
    cluster-nodes: 172.19.103.45:9300,172.19.103.68:9300 #配置es节点信息,逗号分隔,如果没有指定,则启动ClientNode
    client-transport-sniff: false #是否开启嗅探

+ 2 - 1
elasticsearch-transport-starter/src/main/java/com/yihu/elasticsearch/ElasticSearchPool.java

@ -16,7 +16,8 @@ import java.net.InetSocketAddress;
import java.util.Properties;
/**
 * Created by progr1mmer on 2018/1/4.
 * @author progr1mmer
 * @date Created on 2018/1/4.
 */
@Component
@Scope(ConfigurableBeanFactory.SCOPE_SINGLETON)

+ 2 - 1
elasticsearch-transport-starter/src/main/java/com/yihu/elasticsearch/ElasticSearchUtil.java

@ -49,7 +49,8 @@ import java.util.*;
/**
 * Util - Es搜索服务
 * Created by progr1mmer on 2017/12/2.
 * @author progr1mmer
 * @date Created on 2018/1/4.
 */
@Service
@Scope(ConfigurableBeanFactory.SCOPE_SINGLETON)

+ 3 - 3
elasticsearch-transport-starter/src/main/java/com/yihu/elasticsearch/config/ElasticSearchConfig.java

@ -6,10 +6,10 @@ import org.springframework.context.annotation.Configuration;
import javax.annotation.PostConstruct;
/**
 * Created by progr1mmer on 2017/12/1.
 * @author progr1mmer
 * @date Created on 2018/1/4.
 */
@ConfigurationProperties(prefix = "elasticsearch")
@ConfigurationProperties(prefix = "spring.elasticsearch")
@Configuration
public class ElasticSearchConfig {