标签:mybatis spring dea perl not idea mapper ack directory
出现异常原因: 1.IDEA 编译时,没有将mapper.xml文件编译进去
2.application.yml 文件没有指定 mapper.xml 的路径
正确配置
mybatis: mapperLocations: classpath*:club/wenfan/youtube/mapper/xml/*.xml type-aliases-package: club.wenfan.youtube.bean
pom.xml 中添加
<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
</resource>
</resources>
</build>
两点缺一,都会处出现mapper.xml 文件找不到异常
标签:mybatis spring dea perl not idea mapper ack directory
原文地址:https://www.cnblogs.com/outxiao/p/10358967.html