【Mybatis-plus-join】 自定义是否使用MappedStatement缓存

Metadata

title: 【Mybatis-plus-join】 自定义是否使用MappedStatement缓存
date: 2023-01-22 18:39
tags:
  - 行动阶段/完成
  - 主题场景/组件
  - 笔记空间/KnowladgeSpace/ProgramSpace/ModuleSpace
  - 细化主题/Module/Mybatis-plus-join
categories:
  - Mybatis-plus-join
keywords:
  - Mybatis-plus-join
description: 【Mybatis-plus-join】 自定义是否使用MappedStatement缓存 (如果有出现classNotFoud情况,可以尝试关闭)

【Mybatis-plus-join】 自定义是否使用MappedStatement缓存

  @Bean
    public MybatisPlusJoinConfig mybatisPlusJoinConfig() {
        return MybatisPlusJoinConfig.builder()
                /*
                  是否使用MappedStatement缓存,如果使用在JoinInterceptor中就会更改
                  MappedStatement的id,导致mybatis-plus-mate 的某些拦截器插件报错,
                  设置成false,代表不使用缓存则不会更改MappedStatement的id
                 */
                .isUseMsCache(false)
                .build();
    }