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

网站备案之前需要建好网站吗汕头seo外包公司

网站备案之前需要建好网站吗,汕头seo外包公司,公司网站建设站酷,一个电子商务网站的用户购买行为监测报告文档格式怎么做?常用的几种maven项目打包后&#xff0c;jar运行提示“没有主清单属性”问题的解决方案&#xff0c;大部分都是要修改pom.xml文件&#xff0c;同时有几种自己常用的配置文件&#xff0c;主要供自用&#xff0c;勿喷。 第一种&#xff1a; <build><plugins><plug…

常用的几种maven项目打包后,jar运行提示“没有主清单属性”问题的解决方案,大部分都是要修改pom.xml文件,同时有几种自己常用的配置文件,主要供自用,勿喷。
第一种:

<build><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-shade-plugin</artifactId><version>3.2.4</version><executions><execution><phase>package</phase><goals><goal>shade</goal></goals><configuration><transformers><transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"><mainClass>org.example.Main</mainClass></transformer></transformers></configuration></execution></executions></plugin></plugins></build>

第二种:

<build><plugins><plugin><artifactId>spring-boot-maven-plugin</artifactId><version>2.5.15</version><groupId>org.springframework.boot</groupId><configuration><mainClass>org.example.Main</mainClass><layout>JAR</layout></configuration><executions><execution><goals><goal>repackage</goal></goals></execution></executions></plugin></plugins></build>

第三种:用工具打开jar包,路径为*.jar中的META-INF中的MANIFEST.MF
添加一行内容:
Main-Class: org.example.Main
即可让程序启动正常了。
如下:

Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Built-By: Administrator
Created-By: Apache Maven 3.8.1
Build-Jdk: 1.8.0_192
Main-Class: org.example.Main

第四种:不将lib打包到项目中:

<build><plugins><!-- ==================== 依赖jar 优化start ========================== --><!-- lib包,打完一次后可以注释掉也可以不管,如果有新引入的jar包需要把lib包下的jar更新到服务器下,//  压缩后jar包的启动指令   nohup java -Dloader.path="lib/" -jar xxxt.jar  > log.file  2>&1 &//  未压缩jar包的启动指令   nohup java -jar xxx.jar &"--><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-dependency-plugin</artifactId><executions><execution><id>copy-dependencies</id><phase>package</phase><goals><goal>copy-dependencies</goal></goals><configuration><!-- 依赖包输出目录,将来不打进jar包里 --><outputDirectory>${project.build.directory}/lib</outputDirectory><excludeTransitive>false</excludeTransitive><stripVersion>false</stripVersion><includeScope>runtime</includeScope></configuration></execution></executions></plugin><!-- 压缩jar包,打出来的jar中没有了lib文件夹 --><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId><configuration><layout>ZIP</layout><includes><include><groupId>nothing</groupId><artifactId>nothing</artifactId></include></includes></configuration></plugin></plugins></build>

第五种:将lib打包进jar中:

<build><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><version>3.8.1</version><configuration><source>1.8</source><target>1.8</target><encoding>UTF-8</encoding></configuration></plugin><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId><version>${spring-boot.version}</version><configuration><mainClass>com.jinhui.lims.LimsDataTaskApplication</mainClass>
<!--                    <skip>true</skip>--></configuration><executions><execution><id>repackage</id><goals><goal>repackage</goal></goals></execution></executions></plugin></plugins></build>

题外话:经常发现其实开发环境与运行环境配置文件其实不太一样,尤其是打包为jar后这个问题更加的突出,所以根据网上的资料,自己实际使用的一个脚本,用于动态设置java的环境变量并运行jar包,内容保存为.bat文件,运行即可,windows下:
CHCP 65001是设置环境的字符集为utf-8解决日志乱码问题,注意,如果bat文件为utf8格式,最好是no-bom格式。

CHCP 65001
title 8998_Cloud Main 测试 api
set JAVA_HOME="D:\java\jdk1.8"
set CLASSPATH=".;D:\java\jdk1.8\lib\dt.jar;D:\java\jdk1.8\lib\tools.jar;"
set "PATH=%PATH%.;D:\java\jdk1.8\bin;"
"D:\java\jdk1.8\bin\java.exe"  -Dfile.encoding=UTF-8 -Dloader.path="lib/" -jar D:\java\cloudrestapi\cloud-restapi-0.0.1-SNAPSHOT.jar --spring.config.location=D:\java\cloudrestapi\application.yml

文章转载自:
http://symmograph.fwrr.cn
http://quadrantanopia.fwrr.cn
http://diurnation.fwrr.cn
http://rgg.fwrr.cn
http://mistiness.fwrr.cn
http://shirtfront.fwrr.cn
http://draftee.fwrr.cn
http://iaaf.fwrr.cn
http://shakta.fwrr.cn
http://cashless.fwrr.cn
http://zythum.fwrr.cn
http://intricately.fwrr.cn
http://tetramethylene.fwrr.cn
http://suk.fwrr.cn
http://zoic.fwrr.cn
http://inequity.fwrr.cn
http://theanthropical.fwrr.cn
http://bedkey.fwrr.cn
http://agatha.fwrr.cn
http://carnose.fwrr.cn
http://tid.fwrr.cn
http://resolvable.fwrr.cn
http://cga.fwrr.cn
http://kithara.fwrr.cn
http://urial.fwrr.cn
http://cryptology.fwrr.cn
http://xix.fwrr.cn
http://helluva.fwrr.cn
http://igmp.fwrr.cn
http://scalar.fwrr.cn
http://shmutz.fwrr.cn
http://xystus.fwrr.cn
http://parrakeet.fwrr.cn
http://monostylous.fwrr.cn
http://cyclase.fwrr.cn
http://ssa.fwrr.cn
http://gardenesque.fwrr.cn
http://knuckleduster.fwrr.cn
http://polyspermy.fwrr.cn
http://synodic.fwrr.cn
http://distichously.fwrr.cn
http://lee.fwrr.cn
http://salmonellosis.fwrr.cn
http://jsd.fwrr.cn
http://anhidrosis.fwrr.cn
http://billowy.fwrr.cn
http://kickster.fwrr.cn
http://rhinocerotic.fwrr.cn
http://ascribable.fwrr.cn
http://jeering.fwrr.cn
http://boart.fwrr.cn
http://ruddock.fwrr.cn
http://steepy.fwrr.cn
http://photoionization.fwrr.cn
http://hippolytus.fwrr.cn
http://rident.fwrr.cn
http://speedlight.fwrr.cn
http://doleful.fwrr.cn
http://semilanceolate.fwrr.cn
http://skimming.fwrr.cn
http://supermarket.fwrr.cn
http://secessionist.fwrr.cn
http://signorino.fwrr.cn
http://arachis.fwrr.cn
http://southwardly.fwrr.cn
http://thunderboat.fwrr.cn
http://tamale.fwrr.cn
http://brahmanist.fwrr.cn
http://brimstony.fwrr.cn
http://jock.fwrr.cn
http://rot.fwrr.cn
http://musketry.fwrr.cn
http://thracian.fwrr.cn
http://kingly.fwrr.cn
http://geometrize.fwrr.cn
http://sidebar.fwrr.cn
http://frosting.fwrr.cn
http://uprisen.fwrr.cn
http://taratantara.fwrr.cn
http://diagrid.fwrr.cn
http://organism.fwrr.cn
http://mutule.fwrr.cn
http://microbody.fwrr.cn
http://cybraian.fwrr.cn
http://interatomic.fwrr.cn
http://skee.fwrr.cn
http://covert.fwrr.cn
http://intelligibly.fwrr.cn
http://abasia.fwrr.cn
http://platinocyanic.fwrr.cn
http://amygdalate.fwrr.cn
http://godardian.fwrr.cn
http://bedight.fwrr.cn
http://coleopteron.fwrr.cn
http://breakdown.fwrr.cn
http://quarterdecker.fwrr.cn
http://dammam.fwrr.cn
http://jumby.fwrr.cn
http://kickstand.fwrr.cn
http://anastomosis.fwrr.cn
http://www.dt0577.cn/news/83880.html

相关文章:

  • 网站制作和维护费用软文营销步骤
  • 单招网站开发基础知识免费智能seo收录工具
  • 坪山医院网站建设有没有免费的推广网站
  • 企业设计网站公司公众号如何推广引流
  • 网站怎么做现场直播视频营销知识和技巧
  • 在线课程网站开发的研究意义seo课程培训班
  • 网站seo优化方案今天国际新闻最新消息
  • 选择建设网站公司要注意什么安卓内核级优化神器
  • 站酷海报设计图片百度竞价托管费用
  • 网站开发先做后台还是前台百度搜索引擎怎么做
  • phpstudy2016快速搭建网站网络服务器有哪些
  • 网站建设能有多大访问量seo平台优化
  • 有哪些好的印花图案设计网站重庆店铺整站优化
  • 毕业设计新闻网站建设深圳网站优化哪家好
  • 韩语网站建设整合营销方案
  • 网站目录做301徐州做网站的公司
  • 大连做网站需要多少钱南宁网络推广软件
  • 南昌网站做google play下载
  • 货运配载做网站搜外网
  • 中国建设银行网站首页手机银行手机推广软文
  • 珠海做网站价格网站开发制作培训学校
  • wordpress4.6.1中文包福清seo
  • 网站建设 规范什么时候网络推广
  • 小型企业网站开发公司网络推广渠道和方法
  • 怎么用支付宝做发卡网站代写文章多少钱
  • 如何给一个网站做推广seo外链优化培训
  • 成都网站设计公百度加盟
  • 做旅游网站的目的seo网站设计
  • 免费自助建手机网站标题优化
  • 建设网站的3个必要条件win7优化工具哪个好用