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

不能解决的话,参考: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
 就好了

其中的classpath指的是 resource目录
posted @ 2024-01-07 17:31  老白_White  阅读(2674)  评论(0)    收藏  举报