0%

开发规范

1. 项目结构

  • config
  • dto
    • builder
    • factory
  • dao
  • service
  • util

2. controller

类上需要注解 @Validated, @RestController, @RequestMapping
参数上需要注解 @Valid
参数效验放在 controller 层

3. kotlin

  • 注意类属性 is 开头, 在 json 处理时不一致的问题
  • 尽量不要使用作用域函数嵌套, 对象引用是 it 的还能用别名处理, 但对象引用是 this 的就分不清了