上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 37 下一页
摘要: 1、查询索引是index1,类型是blog,id是8、10和索引是lib3,类型是user,id是1、2、3的文档 @Test public void testMultiGet() throws IOException, InterruptedException, ExecutionExceptio 阅读全文
posted @ 2019-12-22 23:36 雷雨客 阅读(972) 评论(0) 推荐(0)
摘要: 新建索引,名称index1、类型blog、title与content用中文分词器 PUT /index1 { "settings": { "number_of_shards": 3, "number_of_replicas": 0 }, "mappings": { "blog":{ "propert 阅读全文
posted @ 2019-12-19 23:10 雷雨客 阅读(353) 评论(0) 推荐(0)
摘要: 1、添加elasticsearch客户端依赖 <dependency> <groupId>org.elasticsearch.client</groupId> <artifactId>transport</artifactId> <version>6.2.4</version> </dependen 阅读全文
posted @ 2019-12-17 22:49 雷雨客 阅读(1768) 评论(0) 推荐(0)
摘要: 1111 阅读全文
posted @ 2019-12-15 18:34 雷雨客 阅读(2121) 评论(0) 推荐(0)
摘要: 复制命令cp总提示是否覆盖的解决方法,在cp前加\ 一些服务器会默认增加别名 alias cp=’cp -i’,当你执行cp时,其实执行的是cp –i。在cp前加\可以解决,如: \cp /etc/aa.txt /tmp 1、复制文件夹及其里面的内容到指定文件夹 cp -r /usr/local/ 阅读全文
posted @ 2019-12-15 18:28 雷雨客 阅读(595) 评论(0) 推荐(0)
摘要: 每一个springboot工程都可以看做一个服务,这也是微服务的基础,使用RestTemplate访问springboot提供的web服务。如下: String BASE_URL="http://127.0.0.1:8080"; RestTemplate res=new RestTemplate() 阅读全文
posted @ 2019-12-15 15:29 雷雨客 阅读(460) 评论(0) 推荐(0)
摘要: (一)springboot中测试的基础知识 (1)添加starter-test依赖,范围指定为test,只在执行测试时生效 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter 阅读全文
posted @ 2019-12-14 19:32 雷雨客 阅读(1659) 评论(0) 推荐(0)
摘要: SpringBoot提供了监测与度量的功能,本篇记录一下使用过程 1、添加依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> 阅读全文
posted @ 2019-12-11 21:41 雷雨客 阅读(459) 评论(0) 推荐(0)
摘要: 本篇记录如何使用SpringBoot的默认日志和其他日志 一、使用默认日志logback 方法1:通过配置application.properties(不推荐) 日志的默认级别是info,且默认只打印在控制台 测试如下,控制台只打印出 info、warn、error,不打印debug package 阅读全文
posted @ 2019-12-08 23:56 雷雨客 阅读(396) 评论(0) 推荐(0)
摘要: SpringBoot能快速开发之一是因为只要引入某个starter就可获取其服务。现自己实现starter-redis,并且总结步骤。 一、创建SpringBoot工程starter-redis 1、添加依赖 <dependency> <groupId>org.springframework.boo 阅读全文
posted @ 2019-12-08 21:13 雷雨客 阅读(528) 评论(0) 推荐(0)
上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 37 下一页