1.start.sh

# start.sh 启动项目
#!/bin/sh
file="/123/springcloud/admin.jar"
if [ -f "$file" ];then
if [ ! -x "$file" ];then
echo "授权执行权限,文件:$file"
chmod a+x $file
fi
echo "开始执行文件:$file"
nohup java -jar $file > //springcloud/admin-log.txt --spring.profiles.active=common,mybatisplus,prd &
else
echo "未找到文件:$file"
fi

3.stop.sh

# 将应用停止
#stop.sh
#!/bin/bash
file="kq-admin.jar"
pid=`ps -ef | grep $file | grep -v grep | awk '{print $2}'`
if [ -n "$pid" ];then
echo "kill $file, pid=$pid"
kill - $pid
else
echo "未找到执行程序:$file"
fi

backup.sh

#back.sh 用于将上次构建的结果备份,然后将新的构建结果移动到合适的位置
#!/bin/bash
# 先判断文件是否存在,如果存在,则备份
file="/lhdata/springcloud/kq/kq-admin.jar"
if [ -f "$file" ];then
cp $file $file.`date +%Y%m%d%H%M%S`
else
echo "未找到文件:$file"
fi

SpringBoot启动和停止脚步的更多相关文章

  1. SpringBoot启动原理分析

    用了差不多两年的SpringBoot了,可以说对SpringBoot已经很熟了,但是仔细一想SpringBoot的启动流程,还是让自己有点懵逼,不得不说是自己工作和学习的失误,所以以此文对Spring ...

  2. springboot 启动的java进程默默终止

    首先说明这是一个灵异事件......... 场景1 :把之前用map实现的缓存用Redis重构,高高兴兴上线更新,10 分钟后,老板告诉我,项目停了,what ??? 像我这么帅气,英俊,聪明的人,更 ...

  3. SpringBoot启动流程分析(二):SpringApplication的run方法

    SpringBoot系列文章简介 SpringBoot源码阅读辅助篇: Spring IoC容器与应用上下文的设计与实现 SpringBoot启动流程源码分析: SpringBoot启动流程分析(一) ...

  4. SpringBoot启动报错Failed to determine a suitable driver class

    SpringBoot启动报错如下 Error starting ApplicationContext. To display the conditions report re-run your app ...

  5. SpringBoot启动方式,Spring Boot 定义系统启动任务

    SpringBoot启动方式,Spring Boot 定义系统启动任务 SpringBoot启动方式 1.1 方法一 1.2 方法二 1.2.1 start.sh 1.2.2 stop.sh 1.2. ...

  6. (五)SpringBoot启动过程的分析-刷新ApplicationContext

    -- 以下内容均基于2.1.8.RELEASE版本 紧接着上一篇[(四)SpringBoot启动过程的分析-预处理ApplicationContext] (https://www.cnblogs.co ...

  7. Springboot 启动分析

    启动类 Spring 启动类主要是 Annotation (@SpringBootApplication) 和 main 方法体中的 SpringApplication.run. 其中注解 @Spri ...

  8. 从SpringBoot启动,阅读源码设计

    目录 一.背景说明 二.SpringBoot工程 三.应用上下文 四.资源加载 五.应用环境 六.Bean对象 七.Tomcat服务 八.事件模型 九.配置加载 十.数据库集成 十一.参考源码 服务启 ...

  9. SpringBoot启动流程源码分析

    前言 SpringBoot项目的启动流程是很多面试官面试中高级Java程序员喜欢问的问题.这个问题的答案涉及到了SpringBoot工程中的源码,也许我们之前看过别的大牛写过的有关SpringBoot ...

随机推荐

  1. Cordova+jQuery Mobile+Spring REST

    Cordova可以方便地建立跨平台的移动应用,使用jQuery Mobile做手机界面,后台使用rest提供数据交互. 首先,使用jQuery Mobile建立一个页面: <!DOCTYPE h ...

  2. 【DeepLearning】Exercise:Sparse Autoencoder

    Exercise:Sparse Autoencoder 习题的链接:Exercise:Sparse Autoencoder 注意点: 1.训练样本像素值需要归一化. 因为输出层的激活函数是logist ...

  3. nginx 中文和英文资料

    http://www.nginx.cn/doc/ http://manual.51yip.com/nginx/ http://tool.oschina.net/apidocs/apidoc?api=n ...

  4. Magento EAV模型

    网址:http://www.ruiwant.com/magento-for-dev-part-7-advanced-orm-entity-attribute-value.html

  5. numpy 切片

    numpy 中的切片与数组中的切片类似. 数组 [ 起始:终止:步长, 起始:终止:步长, ... ] 所有的切片操作(无论是步长为+的正序,还是步长为 - 的逆序)都是开始位置包含,结束位置不包含( ...

  6. aaronyang的百度地图API之LBS云与.NET开发 Javascript API 2.0【把数据存到LBS云1/2】

    如何让用户点,我们可以获得经纬度,我们就要先了解下它给我们提供的百度地图的事件 主要有两个操作事件的,绑定(addEventListener)和解绑(removeEventListener) 一些事件 ...

  7. python类内init外声明的属性与init内声明的对象属性的访问和操作区别

    python类内init外声明的属性与init内声明的对象属性的访问和操作区别(面试题) 1.在ipython中输入以下代码,其输出会是什么? In [1]: class ClassOut: ...: ...

  8. vmware虚拟机三种网络连接方式

    一.概述 vmware为我们提供了三种网络工作模式,它们分别是:Bridged(桥接模式).NAT(网络地址转换模式).Host-Only(仅主机模式). 打开vmware虚拟机,我们可以在选项栏的“ ...

  9. NTC与PTC压敏电阻在电源电路中起的作用

    https://wenku.baidu.com/view/e39beafdfab069dc502201f9.html 压敏电阻的作用 http://www.eepw.com.cn/article/27 ...

  10. 第一篇:初识ASP.NET控件开发_第一节:控件类及其继承关系

    1)System.Web.UI.Control(以下简称Control) Control 类是包括自定义控件.用户控件和页在内的所有 ASP.NET 服务器控件的基类..定义由所有 ASP.NET 服 ...