当前使用版本(必填,否则不予处理)

3.5.1

该问题是如何引起的?(确定最新版也有问题再提!!!)

一共有三个 MybatisSqlSessionFactoryBean @Bean public SqlSessionFactory backstageSqlSessionFactory() throws Exception { MybatisSqlSessionFactoryBean sessionFactoryBean = new MybatisSqlSessionFactoryBean(); sessionFactoryBean.setDataSource(backstageDataSource); sessionFactoryBean.setMapperLocations(new PathMatchingResourcePatternResolver().getResources("classpath:mapper/backstage/.xml")); MybatisPlusInterceptor mybatisPlusInterceptor = new MybatisPlusInterceptor(); mybatisPlusInterceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL)); sessionFactoryBean.setPlugins(mybatisPlusInterceptor); return sessionFactoryBean.getObject(); }

重现步骤(如果有就写完整)

@Mapper public interface NotificationDao extends BaseMapper { }

@Service public class NotificationServiceImpl extends ServiceImpl

LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); lambdaQueryWrapper. select(NotificationModel::getId, NotificationModel::getCreateDatetime, NotificationModel::getType, NotificationModel::getTitleOrDescription, NotificationModel::getTargetPopulation, NotificationModel::getImmediately, NotificationModel::getScheduledTime, NotificationModel::getNotified, NotificationModel::getCreator). eq(NotificationModel::getType, param.getType());

    //分页
    IPage<NotificationModel> page = notificationDao.selectPage(Page.of(param.getPageNo(), param.getPageSize()), lambdaQueryWrapper);

报错信息

    IPage<NotificationModel> page = notificationDao.selectPage(Page.of(param.getPageNo(), param.getPageSize()), lambdaQueryWrapper);

这行代码直接空指针