buguge - Keep it simple,stupid

知识就是力量,但更重要的,是运用知识的能力why buguge?

导航

上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 47 下一页

2023年5月16日 #

lombok.Getter cheated me

摘要: 我们熟知的lombok,分为lombok工具和lombok插件 阅读全文

posted @ 2023-05-16 14:13 buguge 阅读(84) 评论(0) 推荐(0) 编辑

2023年4月28日 #

这两个重载方法,你怎么重构?

摘要: 先看看下面SmsUtil类里的这两个重载方法 @ConfigurationProperties(prefix = "sms.config") @Setter public class SmsUtil { @Autowired private PlatformConfig platformConfig 阅读全文

posted @ 2023-04-28 12:52 buguge 阅读(163) 评论(0) 推荐(0) 编辑

2023年4月19日 #

enumgen升级,支持默认枚举项

摘要: 要解决的问题 >enumgen支持默认枚举项 我的插件工具enumgen投产后,在一次codereview时,我注意到,有的枚举里getBeanByCode是如下这样实现的。即,当无法匹配到对应枚举时,就返回一个默认枚举项。而我的enumgen生成的getBeanByCode里,最后是return 阅读全文

posted @ 2023-04-19 21:11 buguge 阅读(79) 评论(1) 推荐(0) 编辑

2023年4月11日 #

once do, do it well

摘要: CASE1:http工具类调用 昨天出现一个生产问题。我们的channel系统代码里,调用其中一个三方服务商的http接口时未设置超时时间。碰巧昨天出现一笔http请求持续数小时始终无响应,加之程序是单线程处理交易请求,就出现因为线程一直处于RUNNABLE状态而导致系统生产能力严重下降。 现在说这 阅读全文

posted @ 2023-04-11 21:50 buguge 阅读(80) 评论(0) 推荐(0) 编辑

2023年4月3日 #

解决javac注解处理器生成的方法,在编译时报错“找不到符号”

摘要: 最后的解决方案是修正对TreeMaker#Ident方法的使用,见如下AST代码变动 阅读全文

posted @ 2023-04-03 16:53 buguge 阅读(411) 评论(0) 推荐(0) 编辑

2023年3月28日 #

java reflection exception--can not access a member of class XXX with modifiers "private"

摘要: If you try to visit the value of an object's private field using reflection, such as Field#get or Field#set, you should call Field#setAccessible(true) ahead. 阅读全文

posted @ 2023-03-28 11:02 buguge 阅读(378) 评论(0) 推荐(0) 编辑

2023年3月24日 #

来说一个技术点,List作为参数数据丢失问题

摘要: 当引用对象作为方法参数时,我们在方法内部只可更改内存中的内容,但不可变更内存地址。 阅读全文

posted @ 2023-03-24 16:56 buguge 阅读(185) 评论(0) 推荐(0) 编辑

2023年3月21日 #

IDEA Rebuild项目错误:Information:java: java.lang.AssertionError: Value of x -1

摘要: 问题:java.lang.AssertionError: Value of x -1 模仿lombok工具,我的enumgen工具基本上写完了。 发布后准备投产时翻车了!公司的项目emax-rpcapi-list依赖enumgen后,IDEA Rebuild Project时,或者maven pac 阅读全文

posted @ 2023-03-21 13:52 buguge 阅读(163) 评论(0) 推荐(0) 编辑

2023年3月9日 #

利用Javac AST增强枚举功能

摘要: 先就lombok开始本文 lombok想必大家都在使用。 lombok我们怎么用?——两步 Step1:程序添加lombok工具包的依赖。 Step2:IDE安装lombok插件。 就是说,我们需要两个东西:lombok工具(包) & lombok插件 lombok实现原理 1)lombok工具包 阅读全文

posted @ 2023-03-09 13:39 buguge 阅读(112) 评论(0) 推荐(0) 编辑

2023年3月6日 #

hard-coded strings are a bad idea.

摘要: Hard-Coding is a terribly bad practice. 阅读全文

posted @ 2023-03-06 20:00 buguge 阅读(15) 评论(0) 推荐(0) 编辑

上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 47 下一页