@TableField(fill = FieldFill.INSERT)
时间: 2023-10-17 21:30:01 浏览: 155
MybatisPlus中@TableField注解的使用详解
3星 · 编辑精心推荐
@TableField(fill = FieldFill.INSERT)是MyBatis-Plus中的注解,用于设置实体类中对应的字段在插入时需要自动填充。这个注解通常用在实体类的属性上,例如在Java类User中,属性createTime被标注了@TableField(fill = FieldFill.INSERT),表示在插入数据时,createTime字段会被自动填充。这个注解提供了一种简便的方式来实现字段的自动填充,而不需要手动设置。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [LocalDateTime格式化日期和@JsonFormat注解用法和@TableField(fill = FieldFill.INSERT)](https://blog.csdn.net/hyfsbxg/article/details/125787628)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [@TableField(fill = FieldFill.INSERT)](https://blog.csdn.net/m0_50911560/article/details/129829921)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文