java
猫头姐姐
知名互联网高级菜鸟全栈程序媛
展开
-
【JAVA】文件读写工具包
一、读文件import static org.apache.ibatis.io.Resources.getResourceAsStream;import org.apache.commons.io.IOUtils;public String readFile(String fileName) throws IOException { InputStream in = getResourceAsStream(fileName); assert in != null;原创 2021-10-19 15:50:33 · 401 阅读 · 1 评论 -
【JAVA】HTTP工具包
GET1、无headerpublic static String okHttpSendGet(String url) { try { Request request = new Request.Builder().url(url).build(); return okHttpSendGet(request); } catch (Exception e) { throw new RuntimeExcep原创 2021-10-19 15:22:37 · 1324 阅读 · 1 评论 -
【JAVA】thrift接口开发手把手教程(注解方式)server端
博主第一次开发thrift接口,用的注解方式,记录一下step 1 biz层 配置thrift client bean (一个端口支持多个服务)@Configurationpublic class ThriftServerConfig { @Autowired TYourServiceImpl1 tYourService1; @Autowired TYourServiceImpl2 tYourService2; @Bean(name = "serverPubl原创 2020-11-27 14:43:38 · 2483 阅读 · 2 评论 -
【异闻】mac下关闭8080端口
查找8080端口:sudo lsof -i :8080根据PID杀进程:sudo kill -9 pid(对应的pid号)原创 2020-11-03 10:22:13 · 574 阅读 · 0 评论 -
【SQL】mybatis注解操作数据库结合标签语法总结
博主作为一个常常记不住语法的人……给操作数据库中常常要用到的便签语法总结一下便签语言与注释结合的时候,必须用<script></script>给包住1、最基本的if语法@Select("<script>" +" select name from test_table " +" <if test='name != null'> \n...原创 2020-03-15 16:50:04 · 179 阅读 · 0 评论 -
【java】运用easyexcel将list写入excel
1、引入easyexcel的包<dependency> <groupId>com.alibaba</groupId> <artifactId>easyexcel</artifactId> <version>1.0.1</version> ...原创 2019-11-11 20:03:45 · 6661 阅读 · 0 评论 -
数字型字符串转为整数型list
String[] idsArry = enterprise.getProdSubTypeId().split(",");List<Integer> ids =Arrays.stream(idsArry) .map(s->Integer.parseInt(s.trim())) ....转载 2019-09-26 11:28:08 · 1061 阅读 · 0 评论