在不改程序的情況下,修改 sql 時,需要將 Mapper 中的 XML 文件 放到外面
mybatis:
mapper-locations: classpath:mapper/*.xml #JAR 包里面
mybatis:
mapper-locations: file:mapper/*.xml # classpath 改成 path mapper和jar包同級目錄的一個文件 存放xml配置文件,也可以是絕對路徑
在不改程序的情況下,修改 sql 時,需要將 Mapper 中的 XML 文件 放到外面
mybatis:
mapper-locations: classpath:mapper/*.xml #JAR 包里面
mybatis:
mapper-locations: file:mapper/*.xml # classpath 改成 path mapper和jar包同級目錄的一個文件 存放xml配置文件,也可以是絕對路徑
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。