周记 2016.4.17

1. 往Github上提交代码,如何解决failed to push some refs to git:

    1). 此时很多人会尝试下面的命令把当前分支代码上传到master分支上。$ git push -u origin master 但依然没能解决问题

    2). 出现错误的主要原因是github中的README.md文件不在本地代码目录中。可以通过如下命令进行代码合并【注:pull=fetch+merge]

         git pull --rebase origin master

         执行上面代码后可以看到本地代码库中多了README.md文件

    3). 此时再执行语句 git push -u origin master即可完成代码上传到github

         参考:http://jingyan.baidu.com/article/f3e34a12a25bc8f5ea65354a.html?st=2&net_type=&bd_page_type=1&os=0&rst=&word=chegji@gmail.com

2. 添加远程库

    1). git init

    2). git remote add origin git@github.com:michaelliao/learngit.git

    3). git push -u origin master

    参考:http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000/0013752340242354807e192f02a44359908df8a5643103a000

3. 可以利用spring加载properties配置文件。spring配置文件中加载properties配置文件:

    <context:property-placeholder location="classpath:server.properties" />

    代码中可以通过value配置,获取参数值:

    @Value("${unclaim.interval}")

     private int unClaimInterval;

     对于map类型的参数,需要在properties文件中配置成:message.templates={store_join:"加盟",store_pass:"通过"} 类型。注入时,使用 @Value("#{${message.templates}}") 的格式

4. 使用jenkins部署项目,可以通过 Console Output查看部署日志。在tomcat的catlina.out中可以查看项目部署到tomcat中时的日志。

 

转载于:https://www.cnblogs.com/Jtianlin/p/5501730.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值