V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
dtgxx
V2EX  ›  问与答

maven-shade-plugin 如何使用外部的配置文件?

  •  1
     
  •   dtgxx · 2022-12-24 01:10:36 +08:00 · 422 次点击
    这是一个创建于 489 天前的主题,其中的信息可能已经有所发展或是发生改变。
    我的 maven 项目在 src/main/resource 里面有 config.properties;
    我通过 maven-shade-plugin 打出的 jar 包可以使用,但是我需要经常修改 config.properties ,
    目前这个文件是在 jar 包里面的,不方便临时修改,我如何通过 maven-shade-plugin 配置 jar 包同级的 classpath ?

    我希望的是 xxx.jar 配置文件在 jar 包同级目录的 config/config.properties 里面

    没有用到 spring 哈,就是单纯的 maven 项目,请问应该如何配置呢?
    dtgxx
        1
    dtgxx  
    OP
       2022-12-25 13:02:09 +08:00
    大哥们帮帮忙呀~~
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3527 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 04:52 · PVG 12:52 · LAX 21:52 · JFK 00:52
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.