重磅来袭!!!Elasticsearch7.14.1(ES 7.14.1)与Springboot2.5.4的整合
1. 概述
前面我们聊了 Elasticsearch(ES)集群的搭建,今天我们来聊一下,Elasticsearch(ES)集群如何与 Springboot 进行整合。
Elasticsearch(ES)集群的搭建可参见我的另一篇文章《Elasticsearch(ES)集群的搭建》。
Elasticsearch(ES)集群 我们采用的是目前最新的 7.14.1 版本。
Springboot 我们采用的是目前最新的 2.5.4 版本。
2. 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
3. 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 中的主要依赖
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.4</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-elasticsearch</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency> <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
}
}
}
}
3.3 配置 Springboot 配置文件
打开 application.yml 文件,将 Elasticsearch(ES)的集群信息配置在里面
spring:
data:
elasticsearch:
client:
reactive:
endpoints: 192.168.1.8:9200,192.168.1.22:9200,192.168.1.144:9200
elasticsearch:
rest:
uris: 192.168.1.8:9200,192.168.1.22:9200,192.168.1.144:9200
3.4 创建实体类 User
在实体类中用注解标识 实体 与 索引 的对应关系
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import org.springframework.data.elasticsearch.annotations.Setting; import java.util.Date; @Builder
@Setter
@Getter
@Setting(shards = 3, replicas = 1)
@Document(indexName = "index_user", createIndex = false)
public class User { @Id
@Field(store = true, name = "user_id", type = FieldType.Keyword)
private String userId; @Field(store = true, searchAnalyzer = "ik_max_word", analyzer = "ik_max_word")
private String name; @Field(store = true, name = "login_name", type = FieldType.Keyword)
private String loginName; @Field(store = true, type = FieldType.Integer)
private Integer age; @Field(store = true, type = FieldType.Date)
private Date birthday; @Field(store = true, searchAnalyzer = "ik_max_word", analyzer = "ik_max_word")
private String desc; @Field(store = true, name = "head_url", type = FieldType.Keyword)
private String headUrl; }
3.5 单条文档的新增或更新
这里我们使用单元测试,演示一下,Java代码是如何操作Elasticsearch(ES)的。
文档ID不存在则新增文档,ID存在则更新文档
import cn.zhuifengren.myelasticsearch.pojo.User;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate;
import org.springframework.data.elasticsearch.core.mapping.IndexCoordinates;
import org.springframework.data.elasticsearch.core.query.IndexQuery;
import org.springframework.data.elasticsearch.core.query.IndexQueryBuilder; import java.text.ParseException;
import java.text.SimpleDateFormat; @SpringBootTest(classes = MyelasticsearchApplication.class)
public class ElasticsearchTest { @Autowired
private ElasticsearchRestTemplate elasticsearchRestTemplate; @Test
public void save() throws ParseException { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); User user = User.builder()
.userId("2")
.name("夏维尔")
.loginName("xwe")
.age(28)
.birthday(sdf.parse("1992-06-06"))
.desc("我是一名高级开发经理,每天坐地铁上班,在北京住,从不堵车")
.headUrl("https://www.zhuifengren.cn/img/xwe.jpg")
.build(); elasticsearchRestTemplate.save(user);
} }
3.6 依据文档ID更新文档的部分字段
import cn.zhuifengren.myelasticsearch.pojo.User;
import cn.zhuifengren.myelasticsearch.utils.JsonUtils;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate;
import org.springframework.data.elasticsearch.core.document.Document;
import org.springframework.data.elasticsearch.core.mapping.IndexCoordinates;
import org.springframework.data.elasticsearch.core.query.IndexQuery;
import org.springframework.data.elasticsearch.core.query.IndexQueryBuilder;
import org.springframework.data.elasticsearch.core.query.UpdateQuery;
import org.springframework.data.elasticsearch.core.query.UpdateResponse; import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.HashMap;
import java.util.Map; @SpringBootTest(classes = MyelasticsearchApplication.class)
public class ElasticsearchTest { @Autowired
private ElasticsearchRestTemplate elasticsearchRestTemplate; @Test
public void update() { Map<String, Object> params = new HashMap<>();
params.put("name", "夏维尔5"); Document document = Document.from(params); UpdateQuery updateQuery = UpdateQuery.builder("2") // 2 是文档的ID
.withDocument(document)
.build(); UpdateResponse result = elasticsearchRestTemplate.update(updateQuery, IndexCoordinates.of("index_user"));
System.out.println(JsonUtils.objectToJson(result)); // 结果:{"result":"UPDATED"}
} }
3.7 依据文档ID获得文档
import cn.zhuifengren.myelasticsearch.pojo.User;
import cn.zhuifengren.myelasticsearch.utils.JsonUtils;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate;
import org.springframework.data.elasticsearch.core.document.Document;
import org.springframework.data.elasticsearch.core.mapping.IndexCoordinates;
import org.springframework.data.elasticsearch.core.query.IndexQuery;
import org.springframework.data.elasticsearch.core.query.IndexQueryBuilder;
import org.springframework.data.elasticsearch.core.query.UpdateQuery;
import org.springframework.data.elasticsearch.core.query.UpdateResponse; import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.HashMap;
import java.util.Map; @SpringBootTest(classes = MyelasticsearchApplication.class)
public class ElasticsearchTest { @Autowired
private ElasticsearchRestTemplate elasticsearchRestTemplate; @Test
public void getById() { User user = elasticsearchRestTemplate.get("2", User.class);
System.out.println(JsonUtils.objectToJson(user));
// 结果:{"userId":"2","name":"夏维尔5","loginName":"xwe","age":28,"birthday":707760000000,"desc":"我是一名高级开发经理,每天坐地铁上班,在北京住,从不堵车","headUrl":"https://www.zhuifengren.cn/img/xwe.jpg"}
}
}
3.8 依据文档ID删除文档
import cn.zhuifengren.myelasticsearch.pojo.User;
import cn.zhuifengren.myelasticsearch.utils.JsonUtils;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate;
import org.springframework.data.elasticsearch.core.document.Document;
import org.springframework.data.elasticsearch.core.mapping.IndexCoordinates;
import org.springframework.data.elasticsearch.core.query.IndexQuery;
import org.springframework.data.elasticsearch.core.query.IndexQueryBuilder;
import org.springframework.data.elasticsearch.core.query.UpdateQuery;
import org.springframework.data.elasticsearch.core.query.UpdateResponse; import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.HashMap;
import java.util.Map; @SpringBootTest(classes = MyelasticsearchApplication.class)
public class ElasticsearchTest { @Autowired
private ElasticsearchRestTemplate elasticsearchRestTemplate; @Test
public void delete() { String result = elasticsearchRestTemplate.delete("2", User.class);
System.out.println(JsonUtils.objectToJson(result)); // 结果:"2"
}
}
3.9 分页检索
import cn.zhuifengren.myelasticsearch.pojo.User;
import cn.zhuifengren.myelasticsearch.utils.JsonUtils;
import org.elasticsearch.index.query.QueryBuilders;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate;
import org.springframework.data.elasticsearch.core.SearchHits;
import org.springframework.data.elasticsearch.core.document.Document;
import org.springframework.data.elasticsearch.core.mapping.IndexCoordinates;
import org.springframework.data.elasticsearch.core.query.*; import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.HashMap;
import java.util.Map; @SpringBootTest(classes = MyelasticsearchApplication.class)
public class ElasticsearchTest { @Autowired
private ElasticsearchRestTemplate elasticsearchRestTemplate; @Test
public void searchForPage() { Pageable pageable = PageRequest.of(0,10); // page 从第 0 页开始 Query query = new NativeSearchQueryBuilder()
.withQuery(QueryBuilders.matchQuery("desc", "一名小学生"))
.withQuery(QueryBuilders.termQuery("age", 10))
.withPageable(pageable)
.build(); SearchHits<User> result = elasticsearchRestTemplate.search(query, User.class);
System.out.println(JsonUtils.objectToJson(result));
}
}
结果Json:
{
"totalHits": 1,
"totalHitsRelation": "EQUAL_TO",
"maxScore": 1,
"scrollId": null,
"searchHits": [
{
"index": "index_user",
"id": "3",
"score": 1,
"sortValues": [],
"content": {
"userId": "3",
"name": "迪士尼在逃仙柔",
"loginName": "dsnzxr",
"age": 10,
"birthday": 1308672000000,
"desc": "我是一名五年级的小学生,每天专车接专车送,中午在学校入伙,食堂菜可好了,上学期期末考试我拿了三好学生奖",
"headUrl": "https://www.zhuifengren.cn/img/dsnzxr.jpg"
},
"highlightFields": {},
"innerHits": {},
"nestedMetaData": null,
"routing": null,
"explanation": null,
"matchedQueries": []
}
],
"aggregations": null,
"empty": false
}
3.10 高亮的实现
import cn.zhuifengren.myelasticsearch.pojo.User;
import cn.zhuifengren.myelasticsearch.utils.JsonUtils;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.fetch.subphase.highlight.HighlightBuilder;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate;
import org.springframework.data.elasticsearch.core.SearchHits;
import org.springframework.data.elasticsearch.core.document.Document;
import org.springframework.data.elasticsearch.core.mapping.IndexCoordinates;
import org.springframework.data.elasticsearch.core.query.*; import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.HashMap;
import java.util.Map; @SpringBootTest(classes = MyelasticsearchApplication.class)
public class ElasticsearchTest { @Autowired
private ElasticsearchRestTemplate elasticsearchRestTemplate; @Test
public void highlight() { Pageable pageable = PageRequest.of(0,10); // page 从第 0 页开始 HighlightBuilder.Field highlightField = new HighlightBuilder.Field("desc")
.preTags("<span>")
.postTags("</span>"); Query query = new NativeSearchQueryBuilder()
.withQuery(QueryBuilders.matchQuery("desc", "一名小学生"))
.withHighlightFields(highlightField)
.withPageable(pageable)
.build(); SearchHits<User> result = elasticsearchRestTemplate.search(query, User.class);
System.out.println(JsonUtils.objectToJson(result));
}
}
结果Json:
{
"totalHits": 3,
"totalHitsRelation": "EQUAL_TO",
"maxScore": 3.0418546,
"scrollId": null,
"searchHits": [
{
"index": "index_user",
"id": "3",
"score": 3.0418546,
"sortValues": [],
"content": {
"userId": "3",
"name": "迪士尼在逃仙柔",
"loginName": "dsnzxr",
"age": 10,
"birthday": 1308672000000,
"desc": "我是一名五年级的小学生,每天专车接专车送,中午在学校入伙,食堂菜可好了,上学期期末考试我拿了三好学生奖",
"headUrl": "https://www.zhuifengren.cn/img/dsnzxr.jpg"
},
"highlightFields": {
"desc": [
"我是<span>一名</span>五年级的<span>小学生</span>,每天专车接专车送,中午在学校入伙,食堂菜可好了,上学期期末考试我拿了三好<span>学生</span>奖"
]
},
"innerHits": {},
"nestedMetaData": null,
"routing": null,
"explanation": null,
"matchedQueries": []
},
{
"index": "index_user",
"id": "1",
"score": 0.5957724,
"sortValues": [],
"content": {
"userId": "1",
"name": "僵尸猎手",
"loginName": "jsls",
"age": 25,
"birthday": 636220800000,
"desc": "我是一名房产经纪人,现在转行了,目前是一名运输工人",
"headUrl": "https://www.zhuifengren.cn/img/jsls.jpg"
},
"highlightFields": {
"desc": [
"我是<span>一名</span>房产经纪人,现在转行了,目前是<span>一名</span>运输工人"
]
},
"innerHits": {},
"nestedMetaData": null,
"routing": null,
"explanation": null,
"matchedQueries": []
},
{
"index": "index_user",
"id": "2",
"score": 0.46563908,
"sortValues": [],
"content": {
"userId": "2",
"name": "夏维尔",
"loginName": "xwe",
"age": 28,
"birthday": 707760000000,
"desc": "我是一名高级开发经理,每天坐地铁上班,在北京住,从不堵车",
"headUrl": "https://www.zhuifengren.cn/img/xwe.jpg"
},
"highlightFields": {
"desc": [
"我是<span>一名</span>高级开发经理,每天坐地铁上班,在北京住,从不堵车"
]
},
"innerHits": {},
"nestedMetaData": null,
"routing": null,
"explanation": null,
"matchedQueries": []
}
],
"aggregations": null,
"empty": false
}
3.11 自定义排序的实现
import cn.zhuifengren.myelasticsearch.pojo.User;
import cn.zhuifengren.myelasticsearch.utils.JsonUtils;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.fetch.subphase.highlight.HighlightBuilder;
import org.elasticsearch.search.sort.FieldSortBuilder;
import org.elasticsearch.search.sort.SortBuilder;
import org.elasticsearch.search.sort.SortOrder;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate;
import org.springframework.data.elasticsearch.core.SearchHits;
import org.springframework.data.elasticsearch.core.document.Document;
import org.springframework.data.elasticsearch.core.mapping.IndexCoordinates;
import org.springframework.data.elasticsearch.core.query.*; import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.HashMap;
import java.util.Map; @SpringBootTest(classes = MyelasticsearchApplication.class)
public class ElasticsearchTest { @Autowired
private ElasticsearchRestTemplate elasticsearchRestTemplate; @Test
public void sort() { Pageable pageable = PageRequest.of(0,10); // page 从第 0 页开始 HighlightBuilder.Field highlightField = new HighlightBuilder.Field("desc")
.preTags("<span>")
.postTags("</span>"); SortBuilder<FieldSortBuilder> sortBuilder
= new FieldSortBuilder("age").order(SortOrder.DESC); Query query = new NativeSearchQueryBuilder()
.withQuery(QueryBuilders.matchQuery("desc", "一名小学生"))
.withHighlightFields(highlightField)
.withSort(sortBuilder) // 排序可加多个
.withPageable(pageable)
.build(); SearchHits<User> result = elasticsearchRestTemplate.search(query, User.class);
System.out.println(JsonUtils.objectToJson(result));
}
}
4. 综述
今天聊了一下 Elasticsearch7.14.1(ES 7.14.1)与 springboot2.5.4 的整合,希望可以对大家的工作有所帮助。
欢迎帮忙点赞、评论、转发、加关注 :)
关注追风人聊Java,每天更新Java干货。
重磅来袭!!!Elasticsearch7.14.1(ES 7.14.1)与Springboot2.5.4的整合的更多相关文章
- Github上的1000多本免费电子书重磅来袭!
Github上的1000多本免费电子书重磅来袭! 以前 StackOverFlow 也给出了一个免费电子书列表,现在在Github上可以看到时刻保持更新的列表了. 瞥一眼下面的书籍分类目录,你就能 ...
- linux下安装glibc-2.14,解决“`GLIBC_2.14' not found”问题
下载安装包:http://ftp.gnu.org/gnu/glibc/ 我下载的是glibc-2.14.1.tar.gz 解压:tar xzf glibc-2.14.1.tar.gz cd glibc ...
- Ubuntu 14.04 + Linux 3.14.34 系统调用实现文件拷贝
采用 64位系统, ubuntu 14.04 + 新内核linux-3.14.34 下载地址https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.1 ...
- 奥威Power-BI V11——凤凰涅槃,重磅来袭
时隔一年,奥威Power-BI重磅再推新版,在之前V10 WEB可视化前端分析工具基础上,更加注重用户体验这一块.V11站在用户的角度,以用户的视野去设计研发新版本,最终在前端框架的优化.移动设备的体 ...
- 网易蜂巢(云计算基础服务)MongoDB服务重磅来袭
此文已由作者温正湖授权网易云社区发布. 欢迎访问网易云社区,了解更多网易技术产品运营经验. MongoDB是目前最为流行的NoSQL数据库,在2017年1月新鲜出炉的数据库权威排行榜上,MongoDB ...
- 重磅来袭,使用CRL实现大数据分库分表方案
关于分库分表方案详细介绍 http://blog.csdn.net/bluishglc/article/details/7696085 这里就不作详细描述了 分库分表方案基本脱离不了这个结构,受制于实 ...
- 重磅来袭,水木PC客户端全面改版,欢迎使用!
2016-11-04 下载 最新更新 1.优化帖子中回文内容的显示,采用相比正文较小的字体,以及置灰处理,突出正文. 2.可配置是否隐藏帖子中的IP和修改 ...
- 收藏住:金融&电商类原型模板重磅来袭,免费使用!
经常有很多产品经理和设计师想要各行业的产品原型模板,可以直接下载使用.现在分享下一个资源渠道:墨刀的原型模板. 上新了金融类和电商类的主要App设计原型,可以直接免费使用,具体包括: 金融类 招商银行 ...
- 重磅来袭,开源Asp.Net MVC网上商城BrnShop正式发布,提供源码下载(转)
BrnShop网上商城是以Asp.Net mvc3为基础开发的网上商城,源代码完全开源(企业版的源代码目前还没有完全整理完成,一旦整理完成也全部开源). 啥话也不说了,直接上源码:下载源码(由于公司服 ...
随机推荐
- 【Vulnhub】DC-1靶机
一.信息收集 1.1 环境 kali : 192.168.124.141 DC-1 : 192.168.124.150 1.2 nmap进行扫描 :nmap -sV 192.168.124.150 I ...
- 如何快速方便的生成好看的接口文档(apipost生成文档)
一键生成文档 我们在"2分钟玩转APIPOST"一讲中,简单介绍了如何生成并分享接口文档: 点击分享文档 复制并打开文档地址就可以看到了完整的接口文档. 本节课主要是讲解一些需要注 ...
- NOIP 模拟 $31\; \rm Game$
题解 很容易求出在没有字典序最大的限制条件下的最多胜利场数. 这样就可以对于每一位放最优的解,怎么做,二分答案. 分两种情况,一种是当前一位是输的,一种是赢的,复杂度 \(\mathcal O(\rm ...
- 题解 [AHOI2017/HNOI2017]大佬
传送门 注意到题面里n很小,有\(n\leq100\) 考虑联系n的实际意义 n是你在大佬手中能活的天数 题面颇富深意 好了不闹了 n很小,对于\(40\%\)的数据,爆搜即可 考场上靠这个骗了40p ...
- 踩坑记录之 -- String.IndexOf 在 .Net5 和 .Netcore3 中返回值不一样
.Net Core3.1 下 运行此段代码 class Program { static void Main(string[] args) { // .NET Core 3.1 string s = ...
- Django常用 命令
Django常用 命令: 安装: pip install django 指定版本 pip3 install django==2.0 新建项目: django-admin.py startproject ...
- Javascirpt 面向对象总结-继承
JS继承的实现方式 既然要实现继承,那么首先我们得有一个父类,代码如下: // 定义一个动物类 function Animal (name) { // 公有属性 this.name = name || ...
- 基于Linux系统下Apache服务器的安装部署
企业中常用的web服务,用来提供http://(超文本传输协议). web系统是客户端/服务器模式的,所以应该有服务器和客户端里两个部分.常用的服务器程序时Apache,常用的客户端程序是浏览器.ww ...
- Vuex的同步异步存值取值
1. vue中各个组件之间传值 1.父子组件 父组件-->子组件,通过子组件的自定义属性:props 子组件-->父组件,通过自定义事件:this.$emit('事件名',参数1,参数2, ...
- Linux内核编译配置脚本
环境 宿主机平台:Ubuntu 16.04.6 目标机:iMX6ULL Linux内核编译配置脚本 在linux开发过程中熟练使用脚本可以大大简化命令行操作,同时对于需要经常重复操作的指令也是一种备忘 ...