Elasticsearch这里安装在了Windows下
安装Elasticsearch,我这里选择的是最新版本(8.3.3)
下载地址: https://www.elastic.co/cn/downloads/elasticsearch
下载完之后解压文件夹
进入bin
双击执行
执行完成后会显示以下内容
-> Elasticsearch security features have been automatically configured!
-> Authentication is enabled and cluster connections are encrypted.
-> Password for the elastic user (reset with `bin/elasticsearch-reset-password -u elastic`):
01aVmPEg7*bWmgGaXnv0
-> HTTP CA certificate SHA-256 fingerprint:
1ae7d35f3165a808fe6b55fc6090ff938dadc55ac86b3330548ef6b9a896f5b8
-> Configure Kibana to use this cluster:
* Run Kibana and click the configuration link in the terminal when Kibana starts.
* Copy the following enrollment token and paste it into Kibana in your browser (valid for the next 30 minutes):
eyJ2ZXIiOiI4LjMuMyIsImFkciI6WyIxOTIuMTY4LjEuNjY6OTIwMCJdLCJmZ3IiOiIxYWU3ZDM1ZjMxNjVhODA4ZmU2YjU1ZmM2MDkwZmY5MzhkYWRjNTVhYzg2YjMzMzA1NDhlZjZiOWE4OTZmNWI4Iiwia2V5IjoiMWhYcGxJSUJ4QVZtRkx4T0lQZ0U6Nm1ZeXNZTUlUcUNRaU5yTDFnVjZIQSJ9
-> Configure other nodes to join this cluster:
* On this node:
- Create an enrollment token with `bin/elasticsearch-create-enrollment-token -s node`.
- Uncomment the transport.host setting at the end of config/elasticsearch.yml.
- Restart Elasticsearch.
* On other nodes:
- Start Elasticsearch with `bin/elasticsearch --enrollment-token <token>`, using the enrollment token that you generated.
其中,需要注意两处
Elastic为登录账号,01aVmPEg7*bWmgGaXnv0为登录密码,密码是随机生成,不可直接复制本文中的。
安装完成后,进入config文件夹
打开elasticsearch.yml文件
访问访问localhost:9200,出现下图,则成功
文章来源:https://www.toymoban.com/news/detail-611986.html
JEECGBoot的配置
因为在application-dev.yml的配置中,没有配置登录的账户和密码,所以这里我们选择elasticsearch为免密登录
完成以上配置,直接启动项目即可
文章来源地址https://www.toymoban.com/news/detail-611986.html
到了这里,关于JEECG配置elasticsearch的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!