diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000000000000000000000000000000000000..4eb4418d8a1b2806d8072de1825815d60f7fd973 --- /dev/null +++ b/README.en.md @@ -0,0 +1,49 @@ +# lzh-1.8-es-spring-boot-starter + +This project is a Spring Boot-based ElasticSearch starter designed to provide developers with a convenient way to integrate ElasticSearch, simplifying the configuration and usage process. + +## Features + +- Provides auto-configuration functionality through the `EsProperties` class to bind configuration items. +- Automatically creates the `RestHighLevelClient` bean for easy connection to ElasticSearch services. +- Supports common configurations such as setting node information, connection parameters, timeout duration, and connection pool size. +- Highly customizable; ElasticSearch connection information can be configured via configuration files. + +## Configuration Instructions + +Add the following configuration prefix in `application.yml` or `application.properties`: + +```yaml +lzh: + es: + nodes: Comma-separated list of node addresses (e.g., 127.0.0.1:9200) + host: Default host address + port: Default port + schema: Protocol (e.g., http or https) + username: Authentication username (optional) + password: Authentication password (optional) + socketTimeout: Socket timeout in milliseconds + connectTimeout: Connection timeout in milliseconds + connectRequestTimeout: Connection request timeout in milliseconds + maxConnectNum: Maximum number of connections + maxConnectPerRoute: Maximum connections per route + keepAliveTime: Keep-alive time in milliseconds +``` + +## Usage Instructions + +1. Include this Starter in your Spring Boot project. +2. Configure the `lzh.es` related parameters. +3. Use the ElasticSearch client directly by injecting `RestHighLevelClient`. + +## Contributions + +We welcome the submission of Issues and Pull Requests to help us improve this project. + +## License + +This project is licensed under the MIT License. Please be aware of the relevant licensing requirements when using it. + +## Project Repository + +The project is hosted on Gitee at the following address: [https://gitee.com/coding_13/lzh-1.8-es-spring-boot-starter](https://gitee.com/coding_13/lzh-1.8-es-spring-boot-starter) \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..d64275c38aa5c08588eca464730e27a6321ca101 --- /dev/null +++ b/README.md @@ -0,0 +1,51 @@ + + +# lzh-1.8-es-spring-boot-starter + +该项目为一个基于 Spring Boot 的 ElasticSearch 启动器(Starter),旨在为开发人员提供便捷的 ElasticSearch 集成方式,简化配置和使用过程。 + +## 功能特点 + +- 提供自动配置功能,通过 `EsProperties` 类绑定配置项。 +- 自动创建 `RestHighLevelClient` Bean,便于连接 ElasticSearch 服务。 +- 支持设置节点信息、连接参数、超时时间、连接池大小等常用配置。 +- 高度可定制,可通过配置文件自定义 ElasticSearch 的连接信息。 + +## 配置说明 + +在 `application.yml` 或 `application.properties` 中添加以下配置前缀: + +```yaml +lzh: + es: + nodes: 逗号分隔的节点地址列表(如 127.0.0.1:9200) + host: 默认主机地址 + port: 默认端口 + schema: 协议(如 http 或 https) + username: 认证用户名(可选) + password: 认证密码(可选) + socketTimeout: Socket 超时时间(毫秒) + connectTimeout: 连接超时时间(毫秒) + connectRequestTimeout: 连接请求超时时间(毫秒) + maxConnectNum: 最大连接数 + maxConnectPerRoute: 每个路由最大连接数 + keepAliveTime: 保活时间(毫秒) +``` + +## 使用说明 + +1. 引入此 Starter 到您的 Spring Boot 项目中。 +2. 配置 `lzh.es` 相关参数。 +3. 直接通过注入 `RestHighLevelClient` 使用 ElasticSearch 客户端。 + +## 贡献 + +欢迎提交 Issue 和 Pull Request,帮助我们改进这个项目。 + +## 协议 + +该项目遵循 MIT License,请在使用时注意相关许可要求。 + +## 项目地址 + +该项目托管于 Gitee,地址为:[https://gitee.com/coding_13/lzh-1.8-es-spring-boot-starter](https://gitee.com/coding_13/lzh-1.8-es-spring-boot-starter) \ No newline at end of file