不要重复遭轮子,引用可靠的工具包,例如 guava commons 系列、hutool 系列。
- guava 系列
- hutools 系列
- commons 系列
MapUtils.getString Map 为空则返回指定的值。
函数式、流式编程、泛型
Vavr 系列
Try.of
Tuple,支持 2 -> 9 的元组
Case
streamex 增强的流处理
防御式编程。
- Optional
- Iterables
- Objects.isNull
- IterUtil
- MapUtils
- SpringUtils
- Assert
设计模式的封装
- 模板(抽象类实际上就是一个模板方式)
- 门面(防腐层)
- builder
- step builder
- pipeline(责任链)
隐藏细节,starter 隐藏细节
- mapstruct
- queryDSL
- lombok @SneakyThrows
- 自定义注解 @Convert @Mapper
- Spi
- EnableXXX 注入
- 代码借鉴
- bytebuddy 路由
- netty pipeline
- jooq dsl
- Axon Framwork 国外一个领域驱动项目
- Spring
命名统一性。
- Model
- VO
- Request
- Response
- Aware
- Processor
- Holder
