mirror of
https://github.com/RemainderTime/spring-boot-base-demo.git
synced 2026-06-09 11:39:58 +08:00
feat(config): 启用驼峰命名到下划线映射并完善用户实体配置
- 将 application-local.yml 和 application-pre.yml 中 mybatis-plus 的 map-underscore-to-camel-case 设置为 true - 在 StringUtil 类中新增 camelToSnakeCase 方法用于驼峰转下划线命名 - 更新 camelToKebabCase 方法注释并修正转换逻辑 - 为 User 实体类添加 @TableId 注解配置自增主键
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package cn.xf.basedemo.model.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
@@ -17,6 +19,7 @@ import java.util.Date;
|
||||
@TableName(value = "xf_user")
|
||||
public class User {
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
private String name;
|
||||
|
||||
Reference in New Issue
Block a user