mybatis:
type-aliases-package: com.ydm.blog.entity
mapper-locations: classpath:mapper/*.xml
mybatis的配置我想大家用过的都是熟悉的。
class path resource [mapper/*.xml]'; nested exception is java.io.FileNotFoundException: class path resource [mapper/*.xml] cannot be opened because it does not exist
报这个错。很可能是路径错了,但是我看了好像不是

这里面resource也是已经设置为了resources。最奇怪的是,我把*改成其中的一个xml的名字ArticleMapper。
mybatis:
type-aliases-package: com.ydm.blog.entity
mapper-locations: classpath:mapper/ArticleMapper.xml
这样却可以跑起来,没有报错。按道理说,要是路径错了,应该也找不到啊。困扰几天了。路过的朋友看看有什么思路。多谢!