以进销存管理系统、人力资源管理系统、生产管理系统、财务管理系统、图书馆管理系统、酒店管理系统、医院管理系统、教务管理系统等多个当今最为热门的管理信息系统为例子,详细地介绍了这些系统的需求分析及管理信息系统开发的过程和方法。对项目背景、业务需求分析、功能需求分析、数据库需求分析、数据库建模、系统开发、系统编译及系统发行等过程进行了详细的讲解。
本书实例的实用性非常强,读者从中可以迅速了解相应实例的行业特点和用户需求,成为行业专家;同时还可以全面掌握利用Delphi开发管理信息系统的过程和方法。同时从书提供了所有系统完整的数据库建库脚本,读者在实际的工作中可以直接使用并在此基础上进行补充,从而可以大大减少系统数据库设计的工作量和时间。
文件:url80.ctfile.com/f/25127180-514971991-5c8ef9(访问密码:551685)
以下内容无关:
- 概述
前面我们聊了 Elasticsearch(ES)集群的搭建,今天我们来聊一下,Elasticsearch(ES)集群如何与 Springboot 进行整合。
Elasticsearch(ES)集群的搭建可参见我的另一篇文章《Elasticsearch(ES)集群的搭建》。
Elasticsearch(ES)集群 我们采用的是目前最新的 7.14.1 版本。
Springboot 我们采用的是目前最新的 2.5.4 版本。
- Springboot 与 Elasticsearch(ES)的版本对应问题
从 spring-boot-starter-data-elasticsearch 的 jar 包依赖来看,最新的 Springboot 2.5.4 版本 对应的 ElasticSearch(ES)版本应该是 7.12.1。
经本人亲测,API完全可以兼容 ElasticSearch(ES)7.14.1 版本,所以完全不用担心兼容问题。
如果担心有风险,可搭建 ElasticSearch(ES)7.12.1 版本的集群,搭建方法与 7.14.1 版本完全一致,可参见我的另一篇文章《Elasticsearch(ES)集群的搭建》。
ElasticSearch(ES)7.12.1 版本下载地址:
https://www.elastic.co/cn/downloads/past-releases#elasticsearch
https://www.elastic.co/cn/downloads/past-releases/elasticsearch-7-12-1
- Elasticsearch(ES )与 Springboot 的整合
3.1 使用 InterlliJ IDEA 创建Springboot项目
1)打开IDEA,选择 New —> Project…
2)选择 Spring Initializr, 填写项目名称等信息,点击【Next】
3)依赖中勾选 Spring Data Elasticsearch(Access+Driver),点击【Finish】即可
4)pom.xml 中的主要依赖
复制代码
org.springframework.boot
spring-boot-starter-parent
2.5.4
复制代码复制代码
org.springframework.boot
spring-boot-starter-data-elasticsearch
org.springframework.boot
spring-boot-starter-web
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
复制代码
3.2 在 Elasticsearch(ES) 中创建索引 index_user 同时创建映射
特别说明:
不建议使用 Java代码 对索引进行管理类操作,例如:创建索引、更新映射、删除索引。
类似在mysql,我们通常不会用 Java代码 去进行建库、建表、改表、删表的操作,只用代码对表中的数据进行增删改查操作。
PUT http://192.168.1.8:9200/index_user
参数:
复制代码
{
“settings”:{
“index”:{
“number_of_shards”:3,
“number_of_replicas”:1
}
},
“mappings” : {
“properties”:{
“user_id”:{
“type”:“keyword”
},
“name”:{
“type”: “text”,
“fields”: {
“keyword”: {
“ignore_above”: 256,
“type”: “keyword”
}
},
“analyzer”:“ik_max_word”
},
“login_name”:{
“type”:“keyword”
},
“age”:{
“type”:“integer”
},
“birthday”:{
“type”:“date”
},
“desc”:{
“type”:“text”,
“analyzer”:“ik_max_word”
},
“head_url”:{
“type”:“text”,
“index”:false
}
}
}
}