V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
dtgxx
V2EX  ›  问与答

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

  •  1
     
  •   dtgxx · Dec 24, 2022 · 787 views
    This topic created in 1223 days ago, the information mentioned may be changed or developed.
    我的 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
       Dec 25, 2022
    大哥们帮帮忙呀~~
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4283 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 04:05 · PVG 12:05 · LAX 21:05 · JFK 00:05
    ♥ Do have faith in what you're doing.