Fork me on GitHub
摘要: swagger2 导出api为html和word文档 依赖引入 <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artifactId> <version>2.8.0</version> </de 阅读全文
posted @ 2020-12-08 21:10 ayueC 阅读(111) 评论(0) 推荐(0)
摘要: 一、关于Collectors.groupingBy 使用list子元素中某个属性分类,形成map,其key为此属性,value值为此属性值下的list集合。 List<Person> persons = personMapper.selectList(); Map<String,List<Perso 阅读全文
posted @ 2020-12-01 09:48 ayueC 阅读(63) 评论(0) 推荐(0)
摘要: 使用cdp4j通过url完成网页内容转存pdf、截图 cdp4j提供了高级API来通过DevTools协议控制Chrome或Chromium,在浏览器中手动执行的大多数操作都可以使用cdp4j完成。例如: 生成页面的屏幕截图和PDF。 爬网单页应用程序并生成预渲染的内容(服务器端渲染)。 自动执行表 阅读全文
posted @ 2020-11-26 16:23 ayueC 阅读(868) 评论(0) 推荐(0)
摘要: 一. 模糊查询 查询名字以“黄”开头的人物 match (n:person) where n.name starts with '黄' return n 查询名字以“河”结尾的人物 match (n:person) where n.name ends with '河' return n 查询含有“黄 阅读全文
posted @ 2020-11-23 11:41 ayueC 阅读(132) 评论(0) 推荐(0)
摘要: 本文使用的neo4j版本为3.1.0 一. 通过spring boot 添加maven相关依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-neo4j</a 阅读全文
posted @ 2020-11-20 17:20 ayueC 阅读(491) 评论(0) 推荐(0)
摘要: 引入maven依赖 <dependency> <groupId>com.alibaba</groupId> <artifactId>easyexcel</artifactId> <version>1.1.2-beta5</version> </dependency> 编写对应的实体类 import 阅读全文
posted @ 2020-11-20 17:19 ayueC 阅读(668) 评论(0) 推荐(0)
摘要: 一. 通过POI实现向excel中追加数据 我这次需要把抓取数据的结果以追加的方式添加到excel中。因为数据中的内容字段值会有一些不确定的符号(比如常见的逗号),因此不能通过RandomAccessFile类直接见一个".csv"结尾的文件,让系统自动以“,”分割。这里使用了org.apache. 阅读全文
posted @ 2020-11-16 13:53 ayueC 阅读(1044) 评论(0) 推荐(0)
摘要: 一、查询 根据某个字段分组后,再依据另一个字段排序后,取组内第一个数据 index/_search { "from": 0, "size": 0, "aggs": { "youtube_video_th":{ "terms":{ "field": "video_id" }, "aggs":{ "my 阅读全文
posted @ 2020-11-10 19:14 ayueC 阅读(131) 评论(0) 推荐(0)
摘要: 一、查询相关 在es查询中,must相当于sql语句中的and,should相当于or。当想要实现类似于"select * from table where a and (b or c or d)"的功能时可以借助于es中的bool。即RestHighLevelClient中的BoolQueryBu 阅读全文
posted @ 2020-11-10 19:13 ayueC 阅读(510) 评论(0) 推荐(0)
摘要: 性能配置 innodb_buffer_pool_size=1G InnoDB 引擎在内存中有一个缓冲池用于缓存数据和索引,这当然有助于你更快地执行MySQL/MariaDB 查询语句。这是InnoDB 最重要的设置,对InnoDB性能有决定性的影响。默认设置只有128M,所以默认的数据库设置下面In 阅读全文
posted @ 2020-10-23 11:19 ayueC 阅读(2457) 评论(0) 推荐(0)