原 Reason: The elements [mybatis-plus.mapper-locations[0].classpath] were left unbound.
版权声明:本文为博主原创文章,请尊重他人的劳动成果,转载请附上原文出处链接和本声明。
本文链接:https://www.91mszl.com/zhangwuji/article/details/1330
一:项目集成mybatils-plus 异常信息如下:
Binding to target [Bindable@1bde767a type = java.lang.String[], value = 'provided', annotations = array<Annotation>[[empty]]] failed:
Property: mybatis-plus.mapper-locations[0].classpath
Value: mapper/**/*.xml
Origin: class path resource [application-dev.yml] - 32:18
Reason: The elements [mybatis-plus.mapper-locations[0].classpath] were left unbound.
Action:
Update your application's configuration
二:原因:- classpath: mapper/**/*.xml,中间有空格导致的。
错误写法:
正确写法:
正确的yml如下:
mybatis-plus:
type-aliases-package: com.mszl.api.entity # 所有Entity别名类所在包
mapper-locations:
- classpath:mapper/**/*.xml # mapper映射文件
2021-06-20 22:24:52 阅读(2382)
名师出品,必属精品 https://www.91mszl.com