会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
小烽
博客园
首页
新随笔
联系
订阅
管理
1
2
3
4
5
下一页
2022年9月28日
maven 拉取的 jar 包 功能逻辑 与 实际逻辑不同
摘要: 20220921 sdk服务有一段根据url是否带参数的判断的实际代码: maven 加载 jar包后,运行都有报错,查看源码: 直接省略了 对url的判断, 导致 url 没有加参数的 场景都会 抛 数组越界异常。 解决方案 添加log改变优化的行为: 查看源码,正常: 再次运行服务也是正常。 总
阅读全文
posted @ 2022-09-28 15:15 小烽
阅读(94)
评论(0)
推荐(0)
2022年9月2日
maven scope的汇总
摘要: 1、自建 starter 的一些关于 maven 的记录。 可以减小 jar 包的大小,不做依赖传递 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifact
阅读全文
posted @ 2022-09-02 13:53 小烽
阅读(26)
评论(0)
推荐(0)
2022年7月22日
remote write data to prometheus with java
摘要: 背景: 需要从 kafka 消费大量的流量数据, 写入promehteus。 通过直接写, 可以减少 消费和prometheus pull的 交互。 参考文章: 1、实操见 Prometheus Remote Write in Java, 但上面是 remote reader的demo 2、Prom
阅读全文
posted @ 2022-07-22 19:05 小烽
阅读(2094)
评论(1)
推荐(0)
自定义 exporter with java client
摘要: 背景: 需要自定义 时间戳,目前查阅,只能通过 底层的操作才支持 带 自定义的时间戳。 前提: 下载安装 prometheus,见 1、新建springboot项目 <!-- The client --> <dependency> <groupId>io.prometheus</groupId> <
阅读全文
posted @ 2022-07-22 19:03 小烽
阅读(459)
评论(0)
推荐(0)
2021年9月6日
kafka 0.10.0.1 源码编译 之感
摘要: 查看视频 和 网上的文档,下载了对应的版本,但是编译一直有问题。版本如下: kakfa版本 :0.10.0.1 scalan:2.10.6 gradle:3.1 根据提示,不断的修正 版本, 和 修改 build.gradle 和 gradle.script 配置. Gradle 从 3.1 到 7
阅读全文
posted @ 2021-09-06 09:33 小烽
阅读(272)
评论(0)
推荐(0)
2020年11月27日
发送消息 缺少 更新的字段值
摘要: 背景 先看一段代码: @Transactional(rollbackFor = Exception.class) public boolean cancel(OrderRequest request) { long start = System.currentTimeMillis(); String
阅读全文
posted @ 2020-11-27 22:22 小烽
阅读(107)
评论(0)
推荐(0)
2020年9月28日
springboot 下 logback + MDC的使用
摘要: 背景 在项目中, 通过一个 orderId 字段来 贯穿 订单的一个执行过程。 通过 这个 orderId 可以解决 90%的问题排查效率问题,也不需要去 去定义 在 分布式系统中的一个 业务 id。 在刚开始时,业务简单,都是在 log.info 中 人工去写: 存在两个问题: 1、随着代码量越来
阅读全文
posted @ 2020-09-28 16:51 小烽
阅读(2209)
评论(0)
推荐(0)
2020年9月22日
Mock的使用2
摘要: 背景 想重新执行下 以前写的 mock 测试类,发生了一堆的问题,进行部分的梳理和深究。 1、执行mock方法时 异常 org.mockito.exceptions.base.MockitoException: Mockito cannot mock this class: class com.
阅读全文
posted @ 2020-09-22 11:27 小烽
阅读(2092)
评论(0)
推荐(0)
2020年9月9日
StringUtils # split 的坑
摘要: 背景 public static void main(String[] args) { String netmask = "103.140.147.0/24"; System.out.println(org.springframework.util.StringUtils.split(netmask
阅读全文
posted @ 2020-09-09 15:24 小烽
阅读(1405)
评论(0)
推荐(1)
2020年9月4日
controller中路径重复导致启动异常
摘要: 添加接口后,启动报错 2020-09-04 10:35:35,370] [WARN] [] org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext - Except
阅读全文
posted @ 2020-09-04 13:37 小烽
阅读(762)
评论(0)
推荐(0)
1
2
3
4
5
下一页
公告