![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
java
weixin_44096941
这个作者很懒,什么都没留下…
展开
-
pgsql
1.inselect * from test where name in ( '张三','李四 );2. cast('' as jsonb)select cast(jsonb_array_elements(ip) as varchar) as source_ip, count(source_ip) as num \n" + "from test1 (network <> CAST('{}' AS jsonb )) group by sourceIp ORDER...原创 2022-01-18 11:29:41 · 592 阅读 · 0 评论 -
window 查看 服务器某个端口是否开放
telnet 192.168.1.1286379原创 2022-01-12 10:30:25 · 404 阅读 · 0 评论 -
数据库中limit的 用法
limit 的用法 查询第m页 n条1.limit ?,? 和 2.limit ? offset ?limit中第一个参数 (m-1)*n,第二个参数是n ,也就是查第2页,8条数据,limit 8,8,从数据库起始位置8,查询8条数据,是索引位置为8-15 ,数据库索引是从0位置开始limit中第一个参数 是n 第二个参数(m-1)*n...原创 2021-10-25 19:47:39 · 1117 阅读 · 0 评论 -
java8 List转换成map
ArrayList<Student> studentList = new ArrayList<>(); Student student1 = new Student("001", "谢霆锋"); Student student2 = new Student("002", "张学友"); Student student3 = new Student("003", "张柏芝"); studentList.add(stude.原创 2020-07-16 18:12:54 · 253 阅读 · 0 评论 -
书写java代码规范性
格式1.被调用的函数应该放在执行调用的函数下面(垂直顺序);2.try代码块是事务,catch 维持在一种持续状态,无论try代码块中发生了什么均如此;3.别返回null值 ,对于List<泛型>可以返回Collections.emptyList(),可以避免调用此函数报空指针异常;4.优先顺序,公共静态常量、私有静态常量、私有实体变量、很少有公共变量;5.类应该短小;6.类应该只有少量的实体变量7.对象是过程的抽象,线程是调度的抽象8.并发是一种解耦策略9.对于类中 应该使用原创 2020-07-13 15:28:13 · 129 阅读 · 0 评论 -
Springboot 集成es
在pom.xml文件当中org.projectlomboklombok1.16.20 <!--elasticsearch --> <dependency> <groupId>org.elasticsearch</groupId> <artifactId>elasticsearch</artifactId> <version>5.6.8</vers原创 2020-07-08 16:45:25 · 145 阅读 · 1 评论 -
postman下载excel出现乱码
原创 2020-07-08 16:29:53 · 4004 阅读 · 3 评论 -
springboot下载excel
@GetMapping("exportExcel") public void export(HttpServletResponse response) { Workbook workbook = null; OutputStream out = null; try { // todo 根据业务需求获取需要写入Excel的数据列表 dataList List<ExcelDataVo> data.原创 2020-07-08 16:27:23 · 236 阅读 · 0 评论 -
springboot 使用poi 上传导入excel
在pom文件中 <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi</artifactId> <version>4.0.1</version> </dependency> <dependency> <groupId>org.原创 2020-07-08 16:11:44 · 273 阅读 · 0 评论 -
java使用poi读取excel
在pom.xml文件中引入 <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi</artifactId> <version>4.0.1</version> </dependency> <dependency> <groupId>原创 2020-07-07 14:02:05 · 106 阅读 · 0 评论 -
java读取txt文件json对象
CodeName.txt文件中是{“English”:“英国”,”China“:“中国”,}String dirname = “D:/test/CodeToName.txt”;List countries = new ArrayList<>();List strings = new ArrayList<>();//创建一个文件对象File codeNameFile = new File(dirname);//从硬盘存在的一个文件,读取其内容到程序中,用FileI原创 2020-07-03 19:14:06 · 1624 阅读 · 0 评论