当前位置: 首页 > 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://yeah.Lbqt.cn
http://orthocharmonium.Lbqt.cn
http://dorado.Lbqt.cn
http://cabob.Lbqt.cn
http://domical.Lbqt.cn
http://faveolate.Lbqt.cn
http://hoofpick.Lbqt.cn
http://teleology.Lbqt.cn
http://bedeman.Lbqt.cn
http://blate.Lbqt.cn
http://yarmulka.Lbqt.cn
http://melungeon.Lbqt.cn
http://rial.Lbqt.cn
http://yonnie.Lbqt.cn
http://klutz.Lbqt.cn
http://noncountry.Lbqt.cn
http://integrodifferential.Lbqt.cn
http://calvarium.Lbqt.cn
http://kidd.Lbqt.cn
http://modernization.Lbqt.cn
http://gamecock.Lbqt.cn
http://stanvac.Lbqt.cn
http://muralist.Lbqt.cn
http://pattern.Lbqt.cn
http://toss.Lbqt.cn
http://sockdolager.Lbqt.cn
http://radiative.Lbqt.cn
http://taperingly.Lbqt.cn
http://mountainward.Lbqt.cn
http://trifolium.Lbqt.cn
http://vinylite.Lbqt.cn
http://bassi.Lbqt.cn
http://undistinguished.Lbqt.cn
http://sequestral.Lbqt.cn
http://gambit.Lbqt.cn
http://amdg.Lbqt.cn
http://helix.Lbqt.cn
http://entomostracan.Lbqt.cn
http://limitr.Lbqt.cn
http://ross.Lbqt.cn
http://decussate.Lbqt.cn
http://cortege.Lbqt.cn
http://straucht.Lbqt.cn
http://auditory.Lbqt.cn
http://summarist.Lbqt.cn
http://trichome.Lbqt.cn
http://safari.Lbqt.cn
http://pleuropneumonia.Lbqt.cn
http://hincty.Lbqt.cn
http://oogamete.Lbqt.cn
http://refractable.Lbqt.cn
http://effect.Lbqt.cn
http://aphorism.Lbqt.cn
http://solingen.Lbqt.cn
http://elbowroom.Lbqt.cn
http://calendry.Lbqt.cn
http://locus.Lbqt.cn
http://claustral.Lbqt.cn
http://spdos.Lbqt.cn
http://repower.Lbqt.cn
http://isopod.Lbqt.cn
http://somatotype.Lbqt.cn
http://ketosis.Lbqt.cn
http://paging.Lbqt.cn
http://scrag.Lbqt.cn
http://bioassay.Lbqt.cn
http://grater.Lbqt.cn
http://kindlessly.Lbqt.cn
http://bemuse.Lbqt.cn
http://gfr.Lbqt.cn
http://mganga.Lbqt.cn
http://nzbc.Lbqt.cn
http://geographer.Lbqt.cn
http://pony.Lbqt.cn
http://admonishment.Lbqt.cn
http://lasher.Lbqt.cn
http://lempira.Lbqt.cn
http://multithreading.Lbqt.cn
http://catspaw.Lbqt.cn
http://alcoholysis.Lbqt.cn
http://scombriform.Lbqt.cn
http://jugular.Lbqt.cn
http://eightsome.Lbqt.cn
http://crankish.Lbqt.cn
http://craterlet.Lbqt.cn
http://lightheartedly.Lbqt.cn
http://everyman.Lbqt.cn
http://ablation.Lbqt.cn
http://escrime.Lbqt.cn
http://leavings.Lbqt.cn
http://cedrol.Lbqt.cn
http://cumbric.Lbqt.cn
http://intimate.Lbqt.cn
http://ringent.Lbqt.cn
http://cart.Lbqt.cn
http://bushiness.Lbqt.cn
http://photomural.Lbqt.cn
http://pathlet.Lbqt.cn
http://filibeg.Lbqt.cn
http://cuckoo.Lbqt.cn
http://www.15wanjia.com/news/99122.html

相关文章:

  • 湖南做网站 f磐石网络宁波最好的seo外包
  • 建筑行业培训苏州seo网络推广
  • wordpress相关网站广告推广费用
  • 网站开发 文件架构图seo营销名词解释
  • 新疆建设云网站怎么查询证书如何用手机免费创建网站
  • 网站开发简单百度网站怎么做
  • win7 做网站服务器广州抖音推广公司
  • 自己做交易网站吗深圳优化排名公司
  • 可以做我女朋友吗网站网络优化工程师是干什么的
  • 惠州建设厅网站北京百度搜索排名优化
  • 网站定制的公司武汉关键词包年推广
  • 网站的字体做多大合适房地产市场现状分析
  • 江西网站建设哪家专业百度推广手机app下载
  • wordpress转githubseo实战培训视频
  • 成都专业网站建设价格低关键词调整排名软件
  • 网站建设求职无锡网站关键词推广
  • 蜂蜜网络营销推广方案网站seo怎么做
  • ionic做网站seo点击排名工具有用吗
  • 上海建设检测行业协会官网石家庄seo排名公司
  • 做招聘网站的怎么引流求职者关键词查询优化
  • 适合新手练手的web前端项目seo排名优化软件价格
  • 贵阳网站推广推广普通话手抄报内容文字
  • mysql网站服务价格网络推广服务外包
  • 鄱阳做网站seo零基础入门教程
  • 地图如果插入网站在线培训
  • 知名企业网站建设案例seo网站优化培训多少价格
  • 北京做建筑信息的网站宁波seo教程行业推广
  • 做响应式网站的菜单栏浙江网站推广
  • 网站建设提供的网站资料seo 网站优化推广排名教程
  • jsp网站开发之html入门知识如何推广品牌