摘要: package com.xahl.kzng.common.utils; import java.sql.Timestamp; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDa 阅读全文
posted @ 2020-11-04 15:48 过氧化氢 阅读(279) 评论(0) 推荐(0) 编辑
摘要: springboot项目部署比较容易,打个jar包就可以了,但是这样导致其上传文件的位置不稳定, 网上找了好多例子,都是指定绝对文件夹进行上传的,最后为了项目需求照猫画虎弄了一个 先看前端 <img id="upload" src="/img/webuploader.png" title="公司lo 阅读全文
posted @ 2020-11-04 15:21 过氧化氢 阅读(2645) 评论(0) 推荐(0) 编辑
摘要: 上次发了Java操作的,今天来篇python操作的,上代码: import os.path import xml.dom.minidom # path = '/home/kanghao/learning_something/about_xml/xml/' path = 'C:/Users/Admin 阅读全文
posted @ 2020-11-04 14:25 过氧化氢 阅读(444) 评论(0) 推荐(0) 编辑
摘要: 与关系查询 /** * &-与关系查询 * * @param parentheses 合并查询关键词 使用&&连接的 * @param except_keywords 排除关键词 * @param field1,field2 */ @Autowired public static BoolQuery 阅读全文
posted @ 2020-11-04 10:47 过氧化氢 阅读(346) 评论(0) 推荐(0) 编辑
摘要: 单个id在单个index中查询数据prepareGet /** * 单个id在单个index中查询数据prepareGet * * @param indexName * 索引,类似数据库名 * @param typeName * 类型,类似表名 * @param id * @return */ pu 阅读全文
posted @ 2020-11-04 10:33 过氧化氢 阅读(274) 评论(0) 推荐(0) 编辑
摘要: 判断索引是否存在 /** * 判断索引是否存在 * * @param index * 索引名,类似数据库名 * @return */ public static boolean isIndexExist(String index) { IndicesExistsRequest request = n 阅读全文
posted @ 2020-11-04 10:23 过氧化氢 阅读(241) 评论(0) 推荐(0) 编辑
摘要: 导入Elasticsearch依赖包 <!-- Elasticsearch6.4.3 依赖 --> <dependency> <groupId>org.elasticsearch</groupId> <artifactId>elasticsearch</artifactId> <version>${ 阅读全文
posted @ 2020-11-04 10:17 过氧化氢 阅读(1336) 评论(0) 推荐(0) 编辑
摘要: 本来使用的paramiko实现的,后来到现场后发现人家设备不支持ssh,所以只能用telnet了,随后终于捣鼓出来了 1 import telnetlib 2 3 Host = "" # 跳板机ip 4 5 # 连接Telnet服务器 6 tn = telnetlib.Telnet(Host, po 阅读全文
posted @ 2020-11-04 09:13 过氧化氢 阅读(315) 评论(0) 推荐(0) 编辑