代码规范and最佳实践

 
 

Map.putAll可以把一个map的key转移到另一个map

notion image

参数返回值是多个的时候可以使用Map

Map<String, Object> billiardsMonitorDeviceInfo = billiardsApi.getMonitDeviceConfig(); @RequestMapping("billiards/monitor/getMonitDeviceConfig") public Map<String, Object> getMonitDeviceConfig()
 

书写代码时注意首行缩进, shift+command+L

 

判断字符串不要判断Null

 

获取返回值时要考虑返回Null的情况