Alt + INSERT选择生成Get/Set方法
1. 选择模板
2. 创建自己的模板
3. 模板内容
#if($field.modifierStatic)
static ##
#end
$field.type ##
#if($field.recordComponent)
${field.name}##
#else
#set($name = $StringUtil.capitalizeWithJavaBeanConvention($StringUtil.sanitizeJavaIdentifier($helper.getPropertyName($field, $project))))
#if($field.boolean && $field.primitive)
is##
#else
get##
#end
${name}##
#end
() {
return #if($field.string)##
${field.name} == null ? "" : ${field.name}.trim();
#elseif($field.numeric)
${field.name} == null ? 0 : ${field.name};
#elseif($field.list)
${field.name} == null ? new ArrayList<>() : ${field.name};
#else
${field.name};
#end
}