elasticsearch 7.5.0 学习笔记
温馨提示:电脑端看不到右侧目录的话请减小缩放比例。
API操作—— 新建或删除查询索引库
新建索引库
新建index,要向服务器发送一个PUT请求,下面是使用curl命令新建了一个名为test的index的例子
curl -XPUT 'localhost:9200/test'
Response:
{
"acknowledged": true,
"shards_acknowledged": true,
"index": "test"
}
删除索引库
删除index,要向服务器发送一个delete请求,下面是删除上面的test的index的例子
curl -XDELETE 'http://localhost:9200/customer'
Response:
{
"acknowledged": true
}
查询索引库
查询index,要发送一个HEAD请求,例子如下
curl -IHEAD 'localhost:9200/test'
Reponse:
HTTP/1.1 200 OK
content-type: application/json; charset=UTF-8
content-length: 359
API操作—— 创建映射关系
接下来的操作用curl比较不方便,复杂的内容使用PostMan进行操作,创建映射关系要使用PUT请求,如下json代码代表我定义了三个字段,分别是title,url和doc,他们的type属性即为数据类型,关于elasticsearch的数据类型这里不过多赘述,analyzer为ik_max_word代表使用了ik分词器的最粗粒度分词
PUT test/_mapping
{
"properties": {
"title": {
"type": "text",
"analyzer": "ik_max_word"
},
"url": {
"type": "text"
},
"doc": {
"type": "text",
"analyzer": "ik_max_word"
}
}
}
Reponse:
{
"acknowledged": true
}
API操作—— 查询映射关系
查询索引库的映射关系要使用GET请求,如下我查询了上面创建的映射关系
curl -XGET 'localhost:9200/test/_mapping'
Response:
{
"test" : {
"mappings" : {
"properties" : {
"doc" : {
"type" : "text",
"analyzer" : "ik_max_word"
},
"title" : {
"type" : "text",
"analyzer" : "ik_max_word"
},
"url" : {
"type" : "text"
}
}
}
}
}
API操作—— 添加更新文档
添加文档
添加数据使用GET请求发送json数据,以上面的索引库为例,我添加以下数据
GET test/_doc
{
"title": "PlumK's blog",
"url": "plumk.site",
"doc": "this is the content,这里是正文"
}
更新文档
更新数据需要知道数据的id,可以通过查找获得,其他的跟添加数据差不多,GET请求http://localhost:9200/test/_doc/bm87BW8BcAj1cF19_7Sf
json如下:(这里的bm87BW8BcAj1cF19_7Sf就是我上面插入数据的id)
GET test/_doc/bm87BW8BcAj1cF19_7Sf
{
"title": "PlumK's blog",
"url": "plumk.site",
"doc": "this is the content,这里是修改后的正文"
}
Response:
{
"_index": "test",
"_type": "_doc",
"_id": "bm87BW8BcAj1cF19_7Sf",
"_version": 2,
"result": "updated",
"_shards": {
"total": 2,
"successful": 1,
"failed": 0
},
"_seq_no": 1,
"_primary_term": 1
}
API操作—— 删除文档
删除数据同样需要知道id,以删除上面的数据为例,对下面url发送DELETE请求:
localhost:9200/test/_doc/bm87BW8BcAj1cF19_7Sf
API操作—— 查询文档
Match all查询
最基本的查询,他将返回所有结果,每个对象的得分为1
POST /test/_search
{
"query":{
"match_all":{}
}
}
Response:
{
"took": 9,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"skipped": 0,
"failed": 0
},
"hits": {
"total": {
"value": 1,
"relation": "eq"
},
"max_score": 1.0,
"hits": [
{
"_index": "test",
"_type": "_doc",
"_id": "bm87BW8BcAj1cF19_7Sf",
"_score": 1.0,
"_source": {
"title": "PlumK's blog",
"url": "plumk.site",
"doc": "this is the content,这里是正文"
}
}
]
}
}
Match查询
match查询返回match中属性相同的条目,下面如果url为plumk就查询不到了,也就是说必须属性完全相同
POST test/_search
{
"query": {
"match": {
"url": "plumk.site"
}
}
}
Reponse:
{
"took": 11,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"skipped": 0,
"failed": 0
},
"hits": {
"total": {
"value": 1,
"relation": "eq"
},
"max_score": 0.2876821,
"hits": [
{
"_index": "test",
"_type": "_doc",
"_id": "bm87BW8BcAj1cF19_7Sf",
"_score": 0.2876821,
"_source": {
"title": "PlumK's blog",
"url": "plumk.site",
"doc": "this is the content,这里是修改后的正文"
}
}
]
}
}
Query String查询
该查询使用查询解析器和query_string关键字。例如下:
POST test/_search
{
"query": {
"query_string": {
"query": "plumk"
}
}
}
Response:
{
"took": 25,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"skipped": 0,
"failed": 0
},
"hits": {
"total": {
"value": 1,
"relation": "eq"
},
"max_score": 0.2876821,
"hits": [
{
"_index": "test",
"_type": "_doc",
"_id": "bm87BW8BcAj1cF19_7Sf",
"_score": 0.2876821,
"_source": {
"title": "PlumK's blog",
"url": "plumk.site",
"doc": "this is the content,这里是修改后的正文"
}
}
]
}
}
设置最小匹配度查询
设置minimum_should_match字段,如果满足这个匹配度就会被查询出来,不多废话,看例子
GET test/_search
{
"query": {
"match": {
"title":{"query": "plumk的博客","minimum_should_match": "50%"}
}
}
}
多字段查询
这里尝试在url和title中搜索plumk
GET test/_search
{
"query": {
"multi_match": {
"query": "plumk",
"fields": ["url", "title"]
}
}
}
接下来的查询我接下来可能使用不到,但是考虑到会有同样刚入门的小白看到这篇博客,所以这里我还是从网上摘抄以下
Term查询
这些查询主要处理数字、日期等结构化数据。如下:
POST /schools/_search
{
"query":{
"term":{"zip":"176115"}
}
}
Reponse:
{
"took":1, "timed_out":false, "_shards":{"total":10, "successful":10, "failed":0},
"hits":{
"total":1, "max_score":0.30685282, "hits":[{
"_index":"schools", "_type":"school", "_id":"1", "_score":0.30685282,
"_source":{
"name":"Central School", "description":"CBSE Affiliation",
"street":"Nagan", "city":"paprola", "state":"HP", "zip":"176115",
"location":[31.8955385, 76.8380405], "fees":2200,
"tags":["Senior Secondary", "beautiful campus"], "rating":"3.3"
}
}]
}
}
Range查询
该查询用于查找值在值范围之间的对象。为此,我们需要使用如下运算符
- gte:大于等于
- gt:大于
- lte:小于等于
- lt:小于
POST /schools*/_search
{
"query":{
"range":{
"rating":{
"gte":3.5
}
}
}
}
Response:
{
"took":31, "timed_out":false, "_shards":{"total":10, "successful":10, "failed":0},
"hits":{
"total":3, "max_score":1.0, "hits":[
{
"_index":"schools", "_type":"school", "_id":"2", "_score":1.0,
"_source":{
"name":"Saint Paul School", "description":"ICSE Affiliation",
"street":"Dawarka", "city":"Delhi", "state":"Delhi",
"zip":"110075", "location":[28.5733056, 77.0122136], "fees":5000,
"tags":["Good Faculty", "Great Sports"], "rating":"4.5"
}
},
{
"_index":"schools_gov", "_type":"school", "_id":"2", "_score":1.0,
"_source":{
"name":"Government School", "description":"State Board Affiliation",
"street":"Hinjewadi", "city":"Pune", "state":"MH", "zip":"411057",
"location":[18.599752, 73.6821995] "fees":500,
"tags":["Great Sports"], "rating":"4"
}
},
{
"_index":"schools", "_type":"school", "_id":"3", "_score":1.0,
"_source":{
"name":"Crescent School", "description":"State Board Affiliation",
"street":"Tonk Road", "city":"Jaipur", "state":"RJ", "zip":"176114",
"location":[26.8535922, 75.7923988], "fees":2500,
"tags":["Well equipped labs"], "rating":"4.5"
}
}
]
}
}
复合查询
这个比较复杂,这里也不过多赘述,可以去看这个博客
此外还有Joining查询,这个涉及到嵌套映射,就不展开讲了,还有地理查询,暂时用不到,可以去看官方文档
Java操作——初始化
maven中的pom引用如下:
<dependency>
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>7.5.0</version>
</dependency>
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-high-level-client</artifactId>
<version>7.5.0</version>
</dependency>
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-client</artifactId>
<version>7.5.0</version>
</dependency>
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-client-sniffer</artifactId>
<version>7.5.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.8.2</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.8.2</version>
</dependency>
java上的elasticsearch可以连接一个或多个主机初始化客户端,假设我本地主机在9200端口和9021都开了elasticsearch:
RestHighLevelClient client = new RestHighLevelClient(
RestClient.builder(
new HttpHost("localhost", 9200, "http"),
new HttpHost("localhost", 9201, "http")));
关闭客户端:
client.close();
Java 操作——文档增删改
添加文档
首先我们要构建数据,有四种方法,以上面的test索引库为例:
- 直接提交json字符串,这种比较麻烦:
IndexRequest request = new IndexRequest("test"); //索引
request.id("1"); //id,此项可选,原因前面已经讲过了
String jsonString = "{" +
"\"url\":\"rasang.site\"," +
"\"title\":\"rasang's blog\"," +
"\"doc\":\"Welcome to my blog.\"" +
"}";
request.source(jsonString, XContentType.JSON);
- 使用Map作为参数:
Map<String, String> jsonMap = new HashMap<>();
jsonMap.put("url", "rasang.site");
jsonMap.put("title", "rasang's blog");
jsonMap.put("doc", "Welcome to my blog.");
IndexRequest indexRequest = new IndexRequest("test").id("1").source(jsonMap);
- 使用
XConttentBuilder
构建:
XContentBuilder builder = XContentFactory.jsonBuilder();
builder.startObject();
{
builder.field("url", "rasang.site");
builder.field("title", "rasang's blog");
builder.field("doc", "Welcome to my blog.");
}
builder.endObject();
IndexRequest indexRequest = new IndexRequest("test")
.id("1").source(builder);
- 使用键值构建
IndexRequest indexRequest = new IndexRequest("test")
.id("1")
.source("url", "rasang.site",
"title", "rasang's blog",
"doc", "Welcome to my blog.");
其他可选参数:
request.routing("routing"); //路由值
request.timeout(TimeValue.timeValueSeconds(1)); //设置超时
request.timeout("1s"); ////以字符串形式设置超时时间
request.setRefreshPolicy(WriteRequest.RefreshPolicy.WAIT_UNTIL); //以WriteRequest.RefreshPolicy实例形式设置刷新策略
request.setRefreshPolicy("wait_for");//以字符串形式刷新策略
request.version(2); //文档版本
request.versionType(VersionType.EXTERNAL); //文档类型
request.opType(DocWriteRequest.OpType.CREATE); //操作类型
request.opType("create"); //操作类型 可选create或update
request.setPipeline("pipeline"); //索引文档之前要执行的摄取管道的名称
构建完成后发送到elasticsearch执行添加,java的执行方式有两种
同步执行:
IndexResponse indexResponse = client.index(request, RequestOptions.DEFAULT);
同步执行在继续执行后面的代码之前会等待返回索引响应,也就是等待执行结果,可能相应失败或者超时之类的。需要捕获异常。
异步执行
client.indexAsync(request, RequestOptions.DEFAULT, listener);
异步的方法不会阻塞并立即返回。当执行成功后,使用onResponse的方法回调操作监听器,如果失败,则使用onFailure方法回调监听器。监听器实例如下:
listener = new ActionListener<IndexResponse>() {
@Override
public void onResponse(IndexResponse indexResponse) {
}
@Override
public void onFailure(Exception e) {
}
};
删除文档
删除文档需要构建DeleteRequest,下面是删除一个文档的例子,同样的我们也需要文档的id:
DeleteRequest request = new DeleteRequest("test","u7kkCG8B4ZIWSqMC3kJU");
其他可选参数:
request.routing("routing"); //路由值
request.timeout(TimeValue.timeValueMinutes(2)); //以TimeValue形式设置超时
request.timeout("2m"); //以字符串形式设置超时
request.setRefreshPolicy(WriteRequest.RefreshPolicy.WAIT_UNTIL); //以WriteRequest.RefreshPolicy实例的形式设置刷新策略
request.setRefreshPolicy("wait_for"); //以字符串的形式设置刷新策略
request.version(2); //版本
request.versionType(VersionType.EXTERNAL); //版本类型
同样的,删除请求也可以分同步和异步执行,和上面的创建文档相同:
同步执行:
DeleteResponse deleteResponse = client.delete(
request, RequestOptions.DEFAULT);
异步执行:
client.deleteAsync(request, RequestOptions.DEFAULT, listener);
修改文档
修改文档可以用脚本更新,这里我只记录用部分文档更新,因为看起来比较方便,与添加文档类似的,也有四种方式:
UpdateRequest request = new UpdateRequest("test", id);
String jsonString = "{" +
"\"url\":\"rasang.site\"," +
"\"title\":\"rasang's blog\"" +
"\"doc\":\"this is rasang's blog\"" +
"}";
request.doc(jsonString, XContentType.JSON);
Map<String, String> jsonMap = new HashMap<>();
jsonMap.put("url", "rasang.site");
jsonMap.put("title", "rasang's blog");
jsonMap.put("doc", "this is rasang's blog");
UpdateRequest request = new UpdateRequest("test", id)
.doc(jsonMap);
XContentBuilder builder = XContentFactory.jsonBuilder();
builder.startObject();
{
builder.field("url", "rasang.site");
builder.field("title", "rasang's blog");
builder.field("doc", "this is rasang's blog");
}
builder.endObject();
UpdateRequest request = new UpdateRequest("test", id)
.doc(builder);
UpdateRequest request = new UpdateRequest("test", "1")
.doc("url", "rasang.site",
"title", "rasang's blog",
"doc", "this is rasang's blog");
可选参数:
request.routing("routing"); //路由值
request.timeout(TimeValue.timeValueSeconds(1)); //设置超时
request.timeout("1s"); ////以字符串形式设置超时时间
request.setRefreshPolicy(WriteRequest.RefreshPolicy.WAIT_UNTIL); //以WriteRequest.RefreshPolicy实例形式设置刷新策略
request.setRefreshPolicy("wait_for");//以字符串形式刷新策略
request.retryOnConflict(3); //如果要更新的文档在更新操作的获取和索引阶段之间被另一个操作更改,重试更新操作的次数
request.fetchSource(true); //启用源检索,默认情况下禁用
String[] includes = new String[]{"updated", "r*"};
String[] excludes = Strings.EMPTY_ARRAY;
request.fetchSource(
new FetchSourceContext(true, includes, excludes)); //为特定字段配置源包含
String[] includes = Strings.EMPTY_ARRAY;
String[] excludes = new String[]{"updated"};
request.fetchSource(
new FetchSourceContext(true, includes, excludes)); //为特定字段配置源排除
request.setIfSeqNo(2L); //ifSeqNo
request.setIfPrimaryTerm(1L); //ifPrimaryTerm
request.detectNoop(false); //禁用noop检测
request.scriptedUpsert(true); //指出无论文档是否存在,脚本都必须运行,即如果文档不存在,脚本负责创建文档。
request.docAsUpsert(true); //指示如果部分文档尚不存在,则必须将其用作upsert文档。
request.waitForActiveShards(2); //设置在继续更新操作之前必须活动的碎片副本数量。
request.waitForActiveShards(ActiveShardCount.ALL); //ActiveShardCount的碎片副本数。可选值:ActiveShardCount.ALL, ActiveShardCount.ONE或者 ActiveShardCount.DEFAULT
同步执行
UpdateResponse updateResponse = client.update(
request, RequestOptions.DEFAULT);
异步执行
client.updateAsync(request, RequestOptions.DEFAULT, listener);
Java 操作——Bulk批量操作
批量操作需要用到Bulk API,下面我将展示批量操作新建文档,删除文档:
BulkRequest request = new BulkRequest();
request.add(new DeleteRequest("test", "3"));
request.add(new UpdateRequest("test", "2")
.doc(XContentType.JSON,"url", "plumk.site"));
request.add(new IndexRequest("posts").id("4")
.source(XContentType.JSON,"field", "baz"));
同步执行
client.bulkAsync(request, RequestOptions.DEFAULT, listener);
异步执行
client.bulkAsync(request, RequestOptions.DEFAULT, listener);
BulkResponse
BulkResponse是执行返回的结果,类似于ArrayList,可以迭代所有操作结果
for (BulkItemResponse e : bulkResponse) {
DocWriteResponse itemResponse = e.getResponse();
switch (bulkItemResponse.getOpType()) {
case INDEX:
case CREATE:
IndexResponse indexResponse = (IndexResponse) itemResponse;
break;
case UPDATE:
UpdateResponse updateResponse = (UpdateResponse) itemResponse;
break;
case DELETE:
DeleteResponse deleteResponse = (DeleteResponse) itemResponse;
}
}
Java 操作——搜索文档
首先我们要创建SearchRequest对象,指定test索引库
SearchRequest searchRequest = new SearchRequest("test");
可以指定多个查询文档库,如下:
SearchRequest searchRequest = new SearchRequest("posts2","posts", "posts2", "posts1");
又或者可以这么操作:
SearchRequest searchRequest = new SearchRequest();
searchRequest.indices("posts2","posts", "posts2", "posts1");
如果你需要设置路由分片的话:
searchRequest.routing("routing");
指定优先分片查询:
searchRequest.preference("_local");
然后要添加请求的特征参数,添加特征参数我们需要用到SearchSourceBuilder
对象
SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
设置查询的起始索引位置和数量
如下表示从第1条开始,共返回5条文档数据
sourceBuilder.from(0);
sourceBuilder.size(5);
Match all查询
searchSourceBuilder.query(QueryBuilders.matchAllQuery());
Multi match查询
搜索doc或url中含有rasang的文档
QueryBuilder queryBuilder = QueryBuilders.multiMatchQuery("rasang",
"doc", "url");
WildcardQuery模糊查询
?匹配单个字符,*匹配多个字符,查询doc字段含有rasang的文档
WildcardQueryBuilder queryBuilder = QueryBuilders.wildcardQuery("doc",
"*rasang*");
关键字包含查询
以上查询doc字段包含blog的文档
searchSource.query(QueryBuilders.termQuery("doc", "blog"));
// QueryBuilders输入的词条会被es解析并进行分词,在此过程中就已经转换成全小写。
matchQuery模糊查询
QueryBuilder matchQueryBuilder = QueryBuilders.matchQuery("doc", "rasong")
.fuzziness(Fuzziness.AUTO) //启用模糊查询
.prefixLength(3)// 在匹配查询上设置前缀长度选项
.maxExpansions(10);// 设置最大扩展选项以控制查询的模糊过程
searchSource.query(matchQueryBuilder);
//MatchQueryBuilder输入的词条会被es解析并进行分词,在此过程中就已经转换成全小写。
复合查询
//模糊查询
WildcardQueryBuilder queryBuilder1 = QueryBuilders.wildcardQuery(
"doc", "*blog*");//搜索doc中含有blog的文档
WildcardQueryBuilder queryBuilder2 = QueryBuilders.wildcardQuery(
"url", "*rasang*");//搜索url中含有rasang的文档
BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery();
//doc中必须含有blog,url中必须含有rasang,相当于and
boolQueryBuilder.must(queryBuilder1);
boolQueryBuilder.must(queryBuilder2);
还有其他复合如should,mustNot,用法类似。
elasticsearch 7.5.0 学习笔记的更多相关文章
- DirectX 总结和DirectX 9.0 学习笔记
转自:http://www.cnblogs.com/graphics/archive/2009/11/25/1583682.html DirectX 总结 DDS DirectXDraw Surfac ...
- 一起学ASP.NET Core 2.0学习笔记(二): ef core2.0 及mysql provider 、Fluent API相关配置及迁移
不得不说微软的技术迭代还是很快的,上了微软的船就得跟着她走下去,前文一起学ASP.NET Core 2.0学习笔记(一): CentOS下 .net core2 sdk nginx.superviso ...
- vue2.0学习笔记之路由(二)路由嵌套+动画
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- vue2.0学习笔记之路由(二)路由嵌套
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- hdcms v5.7.0学习笔记
hdcms v5.7.0学习笔记 https://note.youdao.com/ynoteshare1/index.html?id=c404d63ac910eb15a440452f73d6a6db& ...
- dhtmlxgrid v3.0学习笔记
dhtmlxgrid v3.0学习笔记 分类: dhtmlx JavaScript2012-01-31 15:41 1744人阅读 评论(0) 收藏 举报 stylesheetdatecalendar ...
- OAuth 2.0学习笔记
文章目录 OAuth的作用就是让"客户端"安全可控地获取"用户"的授权,与"服务商提供商"进行互动. OAuth在"客户端&quo ...
- 一起学ASP.NET Core 2.0学习笔记(一): CentOS下 .net core2 sdk nginx、supervisor、mysql环境搭建
作为.neter,看到.net core 2.0的正式发布,心里是有点小激动的,迫不及待的体验了一把,发现速度确实是快了很多,其中也遇到一些小问题,所以整理了一些学习笔记: 阅读目录 环境说明 安装C ...
- RxJava2.0学习笔记2 2018年7月3日 周二
摘记: 1.map -- 转换 有些服务端的接口设计,会在返回的数据外层包裹一些额外信息,这些信息对于调试很有用,但本地显示是用不到的.使用 map() 可以把外层的格式剥掉,只留下本地会用到的核心 ...
随机推荐
- CDN的智能调度,链路优化的详细解答
您的用户在请求资源的过程中,可能受到网络.地域.带宽等影响,无法保证请求一定是按照最优访问路径进行传递,猫云 CDN 通过对全网链路进行实时监控,结合自研的 GSLB 调度体系和智能路由技术,从以下几 ...
- select下拉框option的样式修改
select原样式: 进行样式修改后的样式: 附上修改代码: //select外面必须包裹一个div,用来覆盖select原有的样式<div class="option"&g ...
- Window权限维持(七):安全支持提供者
安全支持提供程序(SSP)是Windows API,用于扩展Windows身份验证机制.LSASS进程正在Windows启动期间加载安全支持提供程序DLL.这种行为使红队的攻击者可以删除一个任意的SS ...
- 2019-11-29-dotnet-core-使用-GBK-编码
原文:2019-11-29-dotnet-core-使用-GBK-编码 title author date CreateTime categories dotnet core 使用 GBK 编码 li ...
- 基于log4net的日志组件扩展封装,实现自动记录交互日志 XYH.Log4Net.Extend(微服务监控)
背景: 随着公司的项目不断的完善,功能越来越复杂,服务也越来越多(微服务),公司迫切需要对整个系统的每一个程序的运行情况进行监控,并且能够实现对自动记录不同服务间的程序调用的交互日志,以及通一个服务或 ...
- Hyper-V + CentOS7 安装教程(视频)
(双击全屏播放) 一.前言 为什么选择Hyper-V? windowns自带,免费 基础环境 二.虚拟机配置 下载CentOS7镜像 https://www.centos.org/download/ ...
- jQuery遍历 - 过滤first(),last()和eq()使用
jQuery遍历 - 过滤最基本的过滤方法是first(),last()和eq(),它们允许您根据元素在一组元素中的位置选择特定元素. 其他过滤方法(如filter()和not())允许您选择与特定条 ...
- webpack篇,结合理论与实际,加以透彻分析!
Webpack篇 开始着手项目打包的一些东西,还不是特别懂,一边学习,一边做笔记好啦. 1.webpack的概念.Webpack 是当下最热门的前端资源模块化管理和打包工具.任何形式的资源都可以视作模 ...
- vue中路由传值url--路径传值
在vue项目中我们使用路径的方式一般有一下两种方式this.$route.params.userId;一种需要在router上配置对应的数据key, this.$route.query.userId;
- maven 学习---Maven项目文档
本教程将教你如何一步到位创建应用程序的文档.因此,让我们开始,到 C:/MVN 创建java应用程序consumerBanking. OpenconsumerBanking文件夹,然后执行以下命令m ...