mybatis-plus的配置文件中mapper-locations失效的导致Property 'mapperLocations' was not specified的问题解决

发布时间 2024-01-07 17:34:20作者: 老白_White

不能解决的话,参考:springboot项目使用mybatis-plus 时出现 Property ‘mapperLocations‘ was not specified的3个解决方案_property 'mapperlocations' was not specified.-CSDN博客

但我按照上面做了,还是不行,我的配置文件是这样的:

mybatis-plus:
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
   mapper-locations: classpath:/abc/mapper/xml/*.xml

原来是位置写错了,改成:
mybatis-plus:
  mapper-locations: classpath:/abc/mapper/xml/*.xml
  configuration:
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
 就好了