当前位置: 首页 > news >正文

阳江市网站备案幕布网站登录页一般做多大尺寸

阳江市网站备案幕布,网站登录页一般做多大尺寸,天津宁河区建设网站,吉林省建设安全信息网背景 远程部署时spring boot 包&#xff0c;比较大。可以采用依赖库和业务包分离的方式。提供一个脚本进行自动部署 maven 配置分离jar包 <build><finalName>${project.artifactId}</finalName><plugins><plugin><groupId>org.springfra…

背景

远程部署时spring boot 包,比较大。可以采用依赖库和业务包分离的方式。提供一个脚本进行自动部署

maven 配置分离jar包

 <build><finalName>${project.artifactId}</finalName><plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId><version>${spring-boot.version}</version><configuration><!-- 导入系统路径包 --><includeSystemScope>true</includeSystemScope><includes><include><groupId>nothing</groupId><artifactId>nothing</artifactId></include></includes></configuration></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-jar-plugin</artifactId><configuration><archive><!-- 生成的jar中不要包含pom.xml和pom.properties这两个文件 --><addMavenDescriptor>false</addMavenDescriptor><manifest><addClasspath>true</addClasspath><classpathPrefix>lib/</classpathPrefix><!--这里需要修改为你的项目的主启动类--><mainClass>com.ruoyi.RuoYiApplication</mainClass></manifest></archive></configuration></plugin><!--设置将 lib 拷贝到应用 Jar 外面--><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-dependency-plugin</artifactId><executions><execution><id>copy-lib</id><phase>package</phase><goals><goal>copy-dependencies</goal></goals><configuration><outputDirectory>target/lib</outputDirectory><excludeTransitive>false</excludeTransitive><stripVersion>false</stripVersion><includeScope>runtime</includeScope></configuration></execution></executions></plugin></plugins></build>

部署脚本

#!/bin/bashAppName="smart_engineering_admin.jar"
RemoteUser="root"
RemoteHost="xxx.xxx.xxx.xxx"
JVM_OPTS=" -Dloader.path=smart_engineering/lib -Dserver.port=8080 -Dname=$AppName  -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 -Duser.timezone=Asia/Shanghai -Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -XX:+PrintGCDateStamps  -XX:+PrintGCDetails -XX:NewRatio=1 -XX:SurvivorRatio=30 -XX:+UseParallelGC -XX:+UseParallelOldGC"start() {echo "Starting $AppName on $RemoteHost"# 定义一个内嵌的函数来远程查询 PIDquery() {ssh "${RemoteUser}@${RemoteHost}" "ps -ef | grep java | grep '$AppName' | grep -v grep | awk '{print \$2}'"}# 获取远程进程 IDPID=$(query)if [ -n "$PID" ]; thenecho "$AppName is already running on $RemoteHost (pid: $PID)..."elseecho "Starting $AppName on $RemoteHost..."ssh "${RemoteUser}@${RemoteHost}" "nohup java $JVM_OPTS -jar smart_engineering/$AppName > /dev/null 2>&1 &"echo "$AppName started successfully on $RemoteHost."ssh "${RemoteUser}@${RemoteHost}" "tail -f logs/sys-console.log"fi
}sync() {rsync -avc --delete ruoyi-admin/target/lib/ root@140.143.209.33:smart_engineering/libscp ruoyi-admin/target/smart_engineering_admin.jar root@140.143.209.33:smart_engineering/
}stop() {echo "Stopping $AppName on $RemoteHost"# 定义一个内嵌的函数来远程查询 PIDquery() {ssh "${RemoteUser}@${RemoteHost}" "ps -ef | grep java | grep '$AppName' | grep -v grep | awk '{print \$2}'"}# 获取进程 IDPID=$(query)if [ -n "$PID" ]; thenecho "$AppName (pid:$PID) is running. Sending TERM signal..."ssh "${RemoteUser}@${RemoteHost}" "kill -TERM $PID"# 等待进程退出while [ -n "$PID" ]; dosleep 1PID=$(query)doneecho "$AppName has exited."elseecho "$AppName is already stopped."fi
}sync
stop
sleep 2
start
  • 优点
    • 依赖包不变化不会同步,减少上传的文件
    • 每次都同步业务包,保证准确性
    • 提升发布速度

要求

  • windows 的wsl下可用
  • 需要和服务器配置ssh互信

进一步封装

#!/bin/bash./mvnw -T 1C clean package -P prod./push_run.sh
http://www.yayakq.cn/news/124259/

相关文章:

  • 万网建站流程tk域名免费注册网站
  • 美工素材网站网站建设标准一
  • 网络公司怎么做网站无锡网络推广外包
  • 网站关键词优化怎么做正规医院看男科大概多少钱
  • 网站建设与设计试题支付宝手机网站支付二维码怎么做
  • 酒店网站建设因素可以建设网站的公司
  • 天津高自考网站建设与实践2017wordpress 密码
  • 陕西建工第三建设集团网站上海纯设计公司
  • 惠城网站制作遨翔网站建设
  • 网络舆情网站别人给我们做的网站如何关闭
  • 小说网站模板建站网站建设合同 完整版
  • 企业建立网站的目的麻将网站开发
  • 网站内容优化wordpress付费资源
  • 凡科建站微信小程序装修公司网站建设的意义
  • 山东省监理建设协会网站深圳企业网站定制公司
  • 专业商城网站建设哪家便宜网站地图的使用
  • 有哪些招聘网站江苏省教育现代化建设水平监测网站
  • 做食品网站需要什么资质怎样把网站建设在国外
  • 域名注册服务商网站青岛网站排名方案
  • 网站开发php还是jsp重庆新闻论坛
  • 揭阳网站制作费用会展网站建设情况
  • 高校网站集群平台子站开发天津建设招聘信息网站
  • 对网站建设功能的情况说明手机上如何制作自己的网站
  • 网站被跳转公告怎么写请稍后重试(3008)
  • 商城型外贸网站建设东莞凤岗镇
  • 腾讯云做网站干什么用网站开发数据库设计的作用
  • 石排仿做网站国外开源建站系统
  • 购物网站建设的意义与目的网件app
  • 郑州网站建设公资讯网站源码
  • 新网站如何做流量网站打开显示域名错误