2024年7月24日
摘要: 抓包 sql : https://blog.csdn.net/youwen21/article/details/119384744 先 ifconfig 看下网卡信息,一个网卡抓不到,可以试下另外的。 # 指定源端口 和 目的端口 tcpdump -i eth1 -s 0 -l -w - src p 阅读全文
posted @ 2024-07-24 11:10 快鸟 阅读(1) 评论(0) 推荐(0) 编辑
  2024年7月23日
摘要: 注意几个概念:数据源,数据源别名 (shardingjdbc 的配置会给每个数据源配置别名)db实例(物理概念),逻辑库如果 db实例是同一个的话,那么可以只配置一个数据源,通过 shardingjdbc 的路由策略来路由到具体的逻辑库。这样可以降低 db 的连接数。 配置了 hint 的路由策略, 阅读全文
posted @ 2024-07-23 19:15 快鸟 阅读(2) 评论(0) 推荐(0) 编辑
  2024年7月2日
摘要: java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native java.lang.UnsatisfiedLinkError: /Users/wang/Library/Caches/JNA/temp/jna2 阅读全文
posted @ 2024-07-02 11:48 快鸟 阅读(13) 评论(0) 推荐(0) 编辑
  2024年7月1日
摘要: 将 proto 文件转成 java 类: 将 proto 文件放在 /resource 目录下,执行 mvn package ,类会自动生成 <plugin> <groupId>com.github.os72</groupId> <artifactId>protoc-jar-maven-plugin 阅读全文
posted @ 2024-07-01 15:46 快鸟 阅读(5) 评论(0) 推荐(0) 编辑
  2024年6月25日
摘要: 有时我们需要把返回对象中的 Date 类型的字段进行格式化返回给前端。 通常我们可以通过 Json 框架中的格式化注解来快速、优雅的达到目的。 对于 fastjson 和 jackson 的处理方式分别如下: // com.alibaba.fastjson.annotation.JSONField 阅读全文
posted @ 2024-06-25 19:58 快鸟 阅读(2) 评论(0) 推荐(0) 编辑
  2024年6月24日
摘要: spring 多数据源时操作的是哪个db的表? 有时写了一个 mybatis 的 Mapper,预计会操作 db1.table1 ,执行时却报 db2.table1 not exist 。 这 Mapper 中注入的数据源不对,所以操作的库不对 还有一次,mybatis-plus 版本过低,不支持 阅读全文
posted @ 2024-06-24 11:40 快鸟 阅读(2) 评论(0) 推荐(0) 编辑
  2023年12月14日
摘要: 在看 org.springframework.data.redis.support.atomic.RedisAtomicInteger 的源码时,发现了 Spring 的一个类型转换的工具类:DefaultConversionService 能够轻松的将 String 类型和其他类型进行相互转换。 阅读全文
posted @ 2023-12-14 20:58 快鸟 阅读(36) 评论(0) 推荐(0) 编辑
摘要: https://cloud.tencent.com/developer/article/1706934 org.springframework.data.redis.serializer.SerializationException: Cannot deserialize; nested excep 阅读全文
posted @ 2023-12-14 20:29 快鸟 阅读(89) 评论(0) 推荐(0) 编辑
  2023年11月8日
摘要: 我们在服务器上部署时,通常需要将配置文件外部化,常规的做法就是将配置文件的目录(比如: /data/server/conf)添加到 jvm 的 classpath 里面,这样,应用启动后就可以从 classpath 下读取到配置文件了。不同的打包方式(fatjar 和 非fatjar),在启动脚本中 阅读全文
posted @ 2023-11-08 11:41 快鸟 阅读(221) 评论(0) 推荐(0) 编辑
  2023年11月6日
摘要: springboot 默认会加载 yml,properties,xml 类型的配置文件。 注意:springboot 是同时加载这三种类型的配置文件的。所以,我们可以根据需要,在项目中使用多个同名但不同后续的配置文件。 比如:项目中可以有 application.yml 和 application. 阅读全文
posted @ 2023-11-06 17:43 快鸟 阅读(19) 评论(0) 推荐(0) 编辑