importcom.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;importcom.rainbowsea.bean.User;importcom.rainbowsea.mapper.UserMapper;importorg.junit.jupiter.api.Test;importorg.springframework.boot.test.context.SpringBootTest;importjavax.annotation.Resource;importjava.util.List;@SpringBootTestpubliccl...
MyBatis-Plus会在用户调用删除操作时将数据修改 UPDATE set enabled = 0, 在查询的时候会自动拼接只查 where enabled=1的数据。 1、全局配置 在YAML配置文件中添加全局配置 mybatis-plus:global-config:db-config:logic-delete-field:flag # 全局逻辑删除的实体字段名(since3.3.0,配置后可以忽略不配置步骤2)logic...
spring配置文件将自动填充字段、逻辑删除、分页插件都配置上如下: <bean id="sqlSessionFactory" class="com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean"> <property name="dataSource" ref="dataSource"/> <property name="globalConfig" ref="globalConfig"></property> <property name="...
An powerful enhanced toolkit of MyBatis for simplify development - 存在逻辑删除且含有填充字段自动转换实体删除(主键类型必须与值类型完全匹配) · nieqiurong/mybatis-plus@4d5e4e4