自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(22)
  • 收藏
  • 关注

原创 telnet发送get.post请求

telnet

2022-09-16 15:01:08 840 1

原创 监听器打包时项目启动

打包时项目启动

2022-07-18 16:24:48 94

原创 redis报错 noauth

1:连接redis-cli ,输入命令 auth 密码判断密码对不会2:redis.conf查看密码设置requirepass3:查看项目jedis配置是否正确获取到值如果获取到了还是报空就可能是application.yml里没设置最好配置文件里也配置好...

2022-03-24 20:46:25 2372

原创 poi行高

一个行高是12.75,等于一个汉字256正常是两个汉字,也就是25.5

2022-02-10 18:04:02 131

原创 常用小工具

1:获取项目路径public static String resourcePath = ResourceFactory.getInstance().getFilePath() + File.separator;

2022-01-14 15:48:04 89

原创 npm 安装报错 rollbackFailedOptional verb npm-session 解决办法

1、去掉npm代理npm config rm proxynpm config rm https-proxy2:修改npm的资源镜像链接npm config set registry http://registry.npm.taobao.org3:查看是否修改成功npm config get registry

2022-01-05 14:40:05 625

原创 idea添加git

1:在IDEA中设置Git,在File–>Setting->Version Control–>Git–>Path to Git executable选择你的git安装后的git.exe文件,然后点击Test,测试是否设置成功2:创建本地仓库,VCS–>Import into Version Control–>Create Git Repository…...

2021-12-28 13:27:17 1731

原创 idea修改git地址

1、点击VCS;2、点击Git;3、点击Remotes

2021-12-28 13:25:59 191

原创 WRONGPASS invalid username-password pair or user is disabled.

1:旧版本的使用方式,默认用户。兼容旧版本Redis的支持AUTH 2:新方式,还需要验证用户名AUTH auth填密码,密码是redis.conf配置的

2021-11-04 16:12:12 31258 1

原创 BeanUtils.copyProperties

/** * 对象属性拷贝 <br> * 将源对象的属性拷贝到目标对象 * * @param source 源对象 * @param target 目标对象 */ public static void copyProperties(Object source, Object target) { try { BeanUtils.copyProperties(source, target);

2021-10-21 15:03:25 70

原创 json转为带转义字符的格式

public static void main(String[] args) { test test = new test(); List<String> equipIds = new ArrayList<>(); equipIds.add("111"); test.setEquipIds(equipIds); Gson gson = new Gson(); String s = gson.toJson(test); Gson.

2021-10-15 11:23:33 809

原创 算法求多个数比例

1:Double类型转int Double a = 3.3; int i1 = a.intValue(); System.out.println(i1);i1=32:Double的除法 Double a = 3.3; Double b= 2.0;// int i1 = a.intValue(); double v = a / b; System.out.println(v);v=1.653:求两个数最大公约数 /** * 求两个数的最

2021-10-13 15:26:01 503

原创 oracle报错lambdaQuery 无效的列类型,涉及TIMESTAMP类型

报错无效的列类型原因:时间参数转换错误mapper中配置实体类配置要改成这样原因出现错误的原因:因为我的表的createtime类型为DateTime,通过mybatis-plus代码生成器生成的是LocalDateTime,而Java8里面新出来了一些API,LocalDate、LocalTime、LocalDateTime ,但是在默认的情况下,在mybatis里面不支持java8的时间、日期...

2021-09-23 23:26:34 471

原创 docker重启

docker no space left on devicedocker system dfdocker system prune

2021-09-11 17:17:23 67

原创 springboot使用flyway初始化数据库

1:初始化空数据库1.1:引入flyway依赖<dependency> <groupId>org.flywaydb</groupId> <artifactId>flyway-core</artifactId> <version>5.0.3</version></dependency><plugin>

2021-04-10 15:42:06 746

原创 单机es

1:es的9300端口和9200端口的区别9200作为http协议,主要用于外部通讯9300作为tcp协议,jar之间通过tcp协议,es集群是通过9300通讯2:创建http连接pom<!-- elasticsearch的客户端 --> <dependency> <groupId>org.elasticsearch.client</groupId> <artifactId>elasticsearch-re

2021-02-23 16:13:51 153

原创 读取片及配置文件

1:读取图片图片位置在resources下URL resource1 = getClass().getClassLoader().getResource("1.png");2:读取配置文件配置文件在resources下String path = "code.properties"; EncodedResource encodedResource = new EncodedResource(new ClassPathResource(path), Charsets.

2020-10-22 10:31:59 63

原创 浏览器下载服务器文件

@ResponseBody @RequestMapping(method = {RequestMethod.POST, RequestMethod.GET}, path = "/bb/test") void upLoadIpa(HttpServletResponse response, @RequestParam(value = "id", required = true) Integer id ) { //全路径,根目录起 downloadFile(ReportPat..

2020-09-21 15:28:30 278

原创 模拟MultipartFile上传文件

public static void main2(String[] args) { ExecutorService fixedThreadPool = Executors.newFixedThreadPool(10); try { String filepath = "/XX/XX1.ipa";//D盘下的file文件夹的目录 File file = new File(filepath);//File类型可以是文件也可以是文件夹 File pdf = fi

2020-09-21 15:12:23 1670

原创 JSONArray排序

public static void main(String[] args) { JSONArray a = new JSONArray(); JSONObject b = new JSONObject(); JSONObject b1 = new JSONObject(); JSONObject b2 = new JSONObject(); JSONObject b3 = new JSONObject(); b.put("sum",10); b..

2020-09-21 15:08:32 4103

原创 读取配置文件并中文输出

public static void main(String[] args) throws Exception { //resource目录下 String path = "code.properties"; EncodedResource encodedResource = new EncodedResource(new ClassPathResource(path), Charsets.UTF_8); Properties properties = Prop.

2020-09-21 15:04:50 123

原创 导出csv类型文件并创建压缩包

1:`@Testpublic void getCsvTest() throws Exception{//文件名String fileName = “testCsv2”;//导出路径(路径最前面要有/,不然会导出失败)Path path = Paths.get("/Users/ldp/export", “export”, fileName);BufferedWriter bufferedWriter = null;File filePath = new File(Paths.get("/Us

2020-07-13 15:25:37 197

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除