天天看点

Mybatis-plus使用注解 @TableField(exist = false) 注明非数据库字段属性

递归实现:在实体类上添加层级level(int)字段、下级List<Permission> children字段、是否选中boolean

@TableField(exist = false) 注解加载bean属性上,表示当前属性不是数据库的字段,但在项目中必须使用,这样在新增等使用bean的时候,mybatis-plus就会忽略这个,不会报错。

Mybatis-plus使用注解 @TableField(exist = false) 注明非数据库字段属性