随笔分类 -  java

java
摘要:1、修改docker.service 因为远程传输,所以需要开启Docker的2375端口的远程访问权限。 修改docker.service配置 ]# vi /usr/lib/systemd/system/docker.service 在ExecStart=/usr/bin/dockerd-curr 阅读全文
posted @ 2022-09-22 15:04 ☆♂安♀★ 阅读(445) 评论(0) 推荐(0)
摘要:RocketMQ 中出现 org.apache.rocketmq.store.logfile.DefaultMappedFile#warmMappedFile 作用的交出cpu控制权, 在unix中 使用是时间片算法,而在windows中是抢占式。 在时间片算法中,所有进程使用队列排队。操作系统会按 阅读全文
posted @ 2022-09-20 19:17 ☆♂安♀★ 阅读(313) 评论(0) 推荐(0)
摘要:因为newLineAfterDeclaration 默认为true ,会在xml声明后生成一行空行 所以需要指定 format.setNewLineAfterDeclaration(false); 总的代码 try(FileOutputStream fileOutputStream=new File 阅读全文
posted @ 2022-09-08 14:14 ☆♂安♀★ 阅读(336) 评论(0) 推荐(0)
摘要:一、zookeeper 准备配置三个zookeeper,因为我是单台模拟,所以需要使用不同的端口,使用版本是apache-zookeeper-3.6.3-bin (必须是3.5+) 1、第1个zookeeper vi conf/zoo.cfg 修改 dataDir 带指定目录下的 # The num 阅读全文
posted @ 2022-07-14 16:50 ☆♂安♀★ 阅读(492) 评论(0) 推荐(0)
摘要:pom.xml配置 <dependency> <groupId>org.apache.skywalking</groupId> <artifactId>apm-toolkit-logback-1.x</artifactId> <version>{project.release.version}</v 阅读全文
posted @ 2022-07-13 18:34 ☆♂安♀★ 阅读(1154) 评论(0) 推荐(0)
摘要:java -jar -Xbootclasspath/a:/xxx/config xxx .jar 和 java -jar xxx .jar 的区别 1、如果有用Xbootclasspath的话则config的文件会直接覆盖jar里面的resouces文件,覆盖application.yml ,也会覆 阅读全文
posted @ 2022-07-13 15:30 ☆♂安♀★ 阅读(679) 评论(0) 推荐(0)
摘要:一 、elasticsearch 和elasticsearch-head 1、下载 elasticsearch-6.3.1 ,下载地址 :https://pan.baidu.com/s/1ymxyUMe5Bxv1dYlCNW5HKA 來源:http://t.zoukankan.com/feng-jj 阅读全文
posted @ 2022-07-11 18:51 ☆♂安♀★ 阅读(1768) 评论(0) 推荐(1)
摘要:下载 jclasslib Bytecode Viewer https://plugins.jetbrains.com/plugin/9248-jclasslib-bytecode-viewer/versions 下载响应的版本,在idea ->settin->Plugins 进行添加插件 如果是ja 阅读全文
posted @ 2022-06-16 17:53 ☆♂安♀★ 阅读(214) 评论(0) 推荐(0)
摘要:import org.springframework.beans.factory.InitializingBean; @Componentpublic class TestInitializingBean implements InitializingBean{ @Override public v 阅读全文
posted @ 2022-03-31 17:14 ☆♂安♀★ 阅读(123) 评论(0) 推荐(0)
摘要:YYYYMMdd的 YYYY 是表示:当天所在的周属于的年份,一周从周日开始,周六结束,只要本周跨年,那么这周就算入下一年。比如今天是2021-12-29 星期三,然后本周六是2022-01-01,存在着跨年,如果YYYYMMdd展示出来的结果2022-12-29 而yyyyMMdd展示出来时目前日 阅读全文
posted @ 2021-12-29 14:30 ☆♂安♀★ 阅读(3411) 评论(0) 推荐(0)
摘要:Limited Setting Effect 中文描述 Java 8 -Xbootclasspath:<path> Sets the search path for bootstrap classes and resources. 设置引导类和资源的搜索路径。 不常用,否则要重新写所有Java 核心 阅读全文
posted @ 2021-12-21 17:38 ☆♂安♀★ 阅读(1571) 评论(0) 推荐(0)
摘要:// //maximumPoolSize设置为2 ,拒绝策略为AbortPolic策略,直接抛出异常 ThreadPoolExecutor pool = new ThreadPoolExecutor(5, 10, 1000000, TimeUnit.MILLISECONDS, new ArrayBl 阅读全文
posted @ 2021-12-07 10:24 ☆♂安♀★ 阅读(520) 评论(0) 推荐(0)
摘要:Java 操作 Redis 的库有两个,Jedis 和 Lettuce,目前 SpringBoot 2.x 中已经将 Jedis 换成了 Lettuce 原因:Lettuce的连接redis太久没有操作,被强制关闭连接。 可以在spring-boot-starter-data-redis 查看是引用 阅读全文
posted @ 2021-11-24 17:46 ☆♂安♀★ 阅读(1753) 评论(0) 推荐(0)
摘要:<?xml version="1.0" encoding="UTF-8"?> <configuration scan="true" scanPeriod="10 seconds" debug="false"> <!--上下文名称--> <contextName>logback</contextNam 阅读全文
posted @ 2021-11-12 18:13 ☆♂安♀★ 阅读(57) 评论(0) 推荐(0)
摘要:若偶尔报错no operations allowed after connection closed com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure spring: datasource: # 数据源-1 primary: url: jdbc:mysql://127.0.0.1:3306/test1?useSSL=false&autoReconnect=true&characterEncoding=utf8 driver-class-name: com.mysql.jdbc.Driver username: root password: root 阅读全文
posted @ 2021-10-13 20:45 ☆♂安♀★ 阅读(667) 评论(0) 推荐(0)
摘要:继承DefaultCommentGenerator 或者CommentGenerator package com.zhianchen.mysqlremark.toword.config;import org.apache.commons.lang3.StringUtils;import org.my 阅读全文
posted @ 2021-09-08 17:39 ☆♂安♀★ 阅读(643) 评论(0) 推荐(1)
摘要:<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-compress --> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons 阅读全文
posted @ 2021-09-07 15:00 ☆♂安♀★ 阅读(822) 评论(0) 推荐(0)
摘要:import lombok.extern.slf4j.Slf4j; import org.reactivestreams.Publisher; import org.springframework.cloud.gateway.filter.GatewayFilterChain; import org 阅读全文
posted @ 2021-08-15 15:46 ☆♂安♀★ 阅读(71) 评论(0) 推荐(0)
摘要:java getway springcloud 记录请求数据,兼容post请求无参数和response返回无参数 方式1 import com.icar.web.icarutils.util.ClientUtil; import com.icar.web.icarutils.util.IdWorke 阅读全文
posted @ 2021-08-15 15:45 ☆♂安♀★ 阅读(311) 评论(0) 推荐(0)
摘要:账号的权限不够,可能是insert进去的脚本的角色有问题 use admin db.createUser({user:'账号',pwd:'密码',roles:[{role:'userAdminAnyDatabase',db:'admin'},{role:'userAdmin',db:'admin'} 阅读全文
posted @ 2021-07-23 17:03 ☆♂安♀★ 阅读(456) 评论(0) 推荐(0)