码迷,mamicode.com
首页 > 其他好文 > 详细

发现一个牛逼的技能,部署程序时很有用

时间:2018-06-21 17:32:11      阅读:195      评论:0      收藏:0      [点我收藏+]

标签:strong   imp   extension   target   ack   修改   content   The   演示   

一、问题简述

目前公司在蓉城,总公司在北京。新开发了一个项目,需要部署到北京的服务器进行演示。

项目是spring boot开发的,打出来的jar包并不算大,40多M。但是北京那边给的服务器地址实在是慢。

上传jar包就花了12分钟。

上传后,发现少改了一处配置,数据库的用户名、密码没有改。。。

卧槽,这下怎么搞,难道再传一次吗?。。。。

要不先google下,看看能不能直接修改jar包里面的properties文件。

 

二、你要的答案在这里

参考:https://stackoverflow.com/questions/12585567/how-to-edit-the-content-of-an-application-properties-or-application-yml-file-ins

 

.jar file is simply a .zip file with a different extension, and vim can edit zip files and their contents directly! Simply vim your .jar,

use the file navigator to find your properties file and change it. vim will maintain the zip with your edits.

 

所以,直接用vim 编辑你的jar包,然后用上下键选中要编辑的文件,就可以正常用vim去编辑了。

方便到爆炸。

发现一个牛逼的技能,部署程序时很有用

标签:strong   imp   extension   target   ack   修改   content   The   演示   

原文地址:https://www.cnblogs.com/grey-wolf/p/9209293.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!