mybatisplus提示:Property ‘mapperLocations‘ was not specified.
1、问题概述?
在使用springboot整么mybatisPlus启动的使用提示信息:
Property 'mapperLocations' was not specified.
但是我确实写了相对应的配置:
【在pom文件中配置xml识别】
<resources><resource><directory>src/main/java</directory><includes><include>**/*.xml</include></includes></resource>
</resources>
【在application.yml文件中配置了map-locations】
mybatis-plus:configuration:log-impl: org.apache.ibatis.logging.stdout.StdOutImplmap-underscore-to-camel-case: falsemapper-locations: classpath:/com/*/*/mapper/**.xmltype-aliases-package: com.hazq.hazqoa.bean
2、解决办法
我这个问题其实非常简单,就是配置的缩进写的有问题
正确的配置如下:
mybatis-plus:configuration:log-impl: org.apache.ibatis.logging.stdout.StdOutImplmap-underscore-to-camel-case: falsetype-aliases-package: com.hazq.hazqoa.beanmapper-locations: classpath:/com/*/*/mapper/**.xml