solon集成指南
# solon集成指南
solon的集成使用与Springboot的集成使用也基本类似,不同的是注解和配置稍有差异
# 引入依赖
<dependency>
<groupId>org.dromara.easy-es</groupId>
<artifactId>easy-es-solon-plugin</artifactId>
<!-- 版本选当前支持的最新版本即可,须大于等于2.1.0 -->
<version>3.0.0</version>
</dependency>
1
2
3
4
5
6
2
3
4
5
6
✨最新版本 Latest
Version: (opens new window)
# 按需配置app.yml
easy-es:
compatible: true # 兼容模式开关,默认为false,若您的es客户端版本小于8.x,务必设置为true才可正常使用,8.x及以上则可忽略此项配置
address: 127.0.0.1:9200
keep-alive-millis: 18000
global-config:
process-index-mode: manual
async-process-index-blocking: true
print-dsl: true
db-config:
map-underscore-to-camel-case: true
id-type: customize
field-strategy: not_empty
refresh-policy: immediate
enable-track-total-hits: true
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
# 使用
通过@Inject注解在需要用到Mapper的地方直接注入Mapper即可使用,与Springboot下使用并无差异,其它方面亦然.
帮助我们改善此文档 (opens new window)
上次更新: 2025/05/11
← spring集成指南 配置→