现象:项目启动运行的时候,如下报错
nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is ‘file [C:\CSProjects\mycloud\cloud-provider-payment\target\classes\mapper\PaymentMapper.xml]’. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias ‘Payment’. Cause: java.lang.ClassNotFoundException: Cannot find class: Payment
/
原因:application.yml中有配置mybatis的配置写错了,扫描路径写错了。
教训:配置信息能不手写就不手写,手写容易让我们以为自己写的没有问题,这样检查的时候很容易忽略造成时间上的浪费。