小码问答,有问必答!

Springboot+MyBatisPlus涉及到关联查询报ClassCastException

springboot使用的版本为2.5.1,mybatis-plus项目导入的依赖为:

<dependency>
    <groupId>com.baomidou</groupId>
    <artifactId>mybatis-plus-boot-starter</artifactId>
    <version>3.4.3.1</version>
</dependency>

只要在Mapper.xml中有<association>标签设置关联对象就报以下异常:

MybatisConfiguration$StrictMap$Ambiguity cannot cast to 
ResultMap,ResultMap   are in unnamed module of loader app

求大神指导。


JavaEE

收藏

1个回答

我要回答

  • author
    王姐姐 2021-06-23 16:32

    应该是版本有问题,把mybatis-plus-boot-starter换成低版本的试试,比如3.4.0版本。