将MyBatis Mapper xml 放到 jar 包外面

在不改程序的情况下,修改 sql 时,需要将 Mapper 中的 XML 文件 放到外面

mybatis:
    mapper-locations: classpath:mapper/*.xml #JAR 包里面

mybatis:
    mapper-locations: file:mapper/*.xml # classpath 改成 path mapper和jar包同级目录的一个文件 存放xml配置文件,也可以是绝对路径

原文地址:https://www.cnblogs.com/vipsoft/p/14986148.html