搜索要替换的文件在jar包中的路径
jar -tvf biz.jar |grep "PerformanceTrendServiceImpl"
48800 Tue Dec 29 14:55:26 CST 2020 BOOT-INF/classes/cn/gzsendi/modules/biz/resource/service/impl/PerformanceTrendServiceImpl.class
其中BOOT-INF/classes/cn/gzsendi/modules/biz/resource/service/impl/就是路径
创建同路径的文件夹
mkdir -p BOOT-INF/classes/cn/gzsendi/modules/biz/resource/service/impl/
把自己的要替换文件放入文件夹中相应的位置
mv PerformanceTrendServiceImpl.class BOOT-INF/classes/cn/gzsendi/modules/biz/resource/service/impl/
执行文件替换
jar -uvf biz.jar BOOT-INF/classes/cn/gzsendi/modules/biz/resource/service/impl/PerformanceTrendServiceImpl.class