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

网站项目销售外包公司

网站项目,销售外包公司,新网站怎么做seo优化,有啥好玩的网页游戏目录 一、spring-boot-maven-plugin详解 1、添加spring-boot-maven-plugin插件到pom.xml 2、配置主类(Main Class) 3、配置打包的JAR文件名 4、包含或排除特定的资源文件 5、指定额外的依赖项 6、配置运行参数 7、自定义插件执行阶段 二、Maven打…

目录

一、spring-boot-maven-plugin详解

1、添加spring-boot-maven-plugin插件到pom.xml

2、配置主类(Main Class)

3、配置打包的JAR文件名

4、包含或排除特定的资源文件

5、指定额外的依赖项

 6、配置运行参数

7、自定义插件执行阶段

二、Maven打包SpringBoot工程

1、项目配置文件中包含spring-boot-starter-parent

2、添加spring-boot-maven-plugin插件

3、执行Maven打包命令

 4、运行Spring Boot应用程序:


在使用Spring Boot和Maven的项目中,你可以使用Maven来打包你的项目。Spring Boot项目通常使用Maven插件中的spring-boot-maven-plugin来执行打包操作

一、spring-boot-maven-plugin详解

spring-boot-maven-plugin是Spring Boot项目中用于支持Maven构建的插件。它提供了一些功能,使得将Spring Boot应用程序打包成可执行的JAR或WAR文件变得更加简单。以下是一些常见的用法和配置示例:

1、添加spring-boot-maven-plugin插件到pom.xml

<build>部分的<plugins>中添加spring-boot-maven-plugin插件:

<build><plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId></plugin></plugins>
</build>
2、配置主类(Main Class)

通过配置mainClass来指定Spring Boot应用程序的主类。

<build><plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId><configuration><mainClass>com.example.YourApplicationClass</mainClass></configuration></plugin></plugins>
</build>
3、配置打包的JAR文件名

使用<finalName>元素来指定生成的JAR文件的名称。

<build><finalName>custom-application-name</finalName><plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId></plugin></plugins>
</build>
4、包含或排除特定的资源文件

通过配置<resources>元素来包含或排除特定的资源文件。

<build><plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId><configuration><resources><resource><directory>src/main/resources</directory><includes><include>**/*.properties</include></includes></resource></resources></configuration></plugin></plugins>
</build>
5、指定额外的依赖项

通过<dependencies>元素指定额外的依赖项,这些依赖项会被包含到生成的JAR文件中

<build><plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId><configuration><dependencies><dependency><groupId>com.example</groupId><artifactId>extra-library</artifactId><version>1.0.0</version></dependency></dependencies></configuration></plugin></plugins>
</build>
 6、配置运行参数

使用<arguments>元素来配置运行时的JVM参数

<build><plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId><configuration><arguments><argument>--server.port=8081</argument></arguments></configuration></plugin></plugins>
</build>
7、自定义插件执行阶段

通过<executions>元素来自定义插件执行阶段。

<build><plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId><executions><execution><goals><goal>repackage</goal></goals><configuration><!-- 自定义配置 --></configuration></execution></executions></plugin></plugins>
</build>

二、Maven打包SpringBoot工程

1、项目配置文件中包含spring-boot-starter-parent

在你的pom.xml文件中,确保你的项目是继承自spring-boot-starter-parent。这样可以确保使用Spring Boot的合适版本和默认配置。

<parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>2.5.5</version> <!-- 使用你的Spring Boot版本 -->
</parent>
2、添加spring-boot-maven-plugin插件

<build>部分添加spring-boot-maven-plugin插件。

<build><plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId></plugin></plugins>
</build>

这个插件会自动将项目打包成可执行的JAR文件。

3、执行Maven打包命令

打开命令行,进入项目根目录,执行以下Maven命令:

mvn clean package
 

 4、运行Spring Boot应用程序:

使用以下命令来运行打包后的JAR文件:

java -jar your-project.jar


文章转载自:
http://dinncoretirant.tpps.cn
http://dinncomoquette.tpps.cn
http://dinncolactoproteid.tpps.cn
http://dinncointervision.tpps.cn
http://dinncoprimigenial.tpps.cn
http://dinncodresden.tpps.cn
http://dinncoeulogia.tpps.cn
http://dinncodisseminule.tpps.cn
http://dinncorhumba.tpps.cn
http://dinncoormolu.tpps.cn
http://dinncoshoehorn.tpps.cn
http://dinncodistillage.tpps.cn
http://dinncohypergeometric.tpps.cn
http://dinncotrow.tpps.cn
http://dinncoavocation.tpps.cn
http://dinncowats.tpps.cn
http://dinncordb.tpps.cn
http://dinncoanathemata.tpps.cn
http://dinncospinstry.tpps.cn
http://dinncolindane.tpps.cn
http://dinncorecital.tpps.cn
http://dinncotopectomize.tpps.cn
http://dinncochalky.tpps.cn
http://dinncorelatival.tpps.cn
http://dinncohel.tpps.cn
http://dinncoassist.tpps.cn
http://dinncohumidor.tpps.cn
http://dinncobruiser.tpps.cn
http://dinncoparainfluenza.tpps.cn
http://dinncotex.tpps.cn
http://dinncophoto.tpps.cn
http://dinncobyzantium.tpps.cn
http://dinncovulcanisation.tpps.cn
http://dinncomincing.tpps.cn
http://dinncomahometan.tpps.cn
http://dinncowheyey.tpps.cn
http://dinnconosogeography.tpps.cn
http://dinncocomby.tpps.cn
http://dinnconoseguard.tpps.cn
http://dinncobabiroussa.tpps.cn
http://dinncoblackmarket.tpps.cn
http://dinncohalophile.tpps.cn
http://dinncocotemporaneous.tpps.cn
http://dinncoeuploidy.tpps.cn
http://dinncounload.tpps.cn
http://dinncoholometaboly.tpps.cn
http://dinncohauteur.tpps.cn
http://dinncovelma.tpps.cn
http://dinnconatterjack.tpps.cn
http://dinncoequidistant.tpps.cn
http://dinncotripolitania.tpps.cn
http://dinncolignose.tpps.cn
http://dinncobiddable.tpps.cn
http://dinncoectostosis.tpps.cn
http://dinncoba.tpps.cn
http://dinncopanjabi.tpps.cn
http://dinncoembezzlement.tpps.cn
http://dinncomig.tpps.cn
http://dinncoemeute.tpps.cn
http://dinncodigs.tpps.cn
http://dinncodiagram.tpps.cn
http://dinncoexertive.tpps.cn
http://dinncoselectric.tpps.cn
http://dinncobarbicel.tpps.cn
http://dinncoantrorsely.tpps.cn
http://dinncolesbian.tpps.cn
http://dinncopreselector.tpps.cn
http://dinncoannal.tpps.cn
http://dinncogcm.tpps.cn
http://dinncotransconfessional.tpps.cn
http://dinncosoapboxer.tpps.cn
http://dinncohiragana.tpps.cn
http://dinncochina.tpps.cn
http://dinncocountershock.tpps.cn
http://dinncoestrual.tpps.cn
http://dinncosastruga.tpps.cn
http://dinncodagga.tpps.cn
http://dinncogertie.tpps.cn
http://dinncoconjuncture.tpps.cn
http://dinncohighway.tpps.cn
http://dinncoleucoma.tpps.cn
http://dinncogneiss.tpps.cn
http://dinncolikability.tpps.cn
http://dinncovaticination.tpps.cn
http://dinncotif.tpps.cn
http://dinncoidealize.tpps.cn
http://dinncodankness.tpps.cn
http://dinncoarenicolous.tpps.cn
http://dinncopipefish.tpps.cn
http://dinnconarcosynthesis.tpps.cn
http://dinncoetaerio.tpps.cn
http://dinncoinfect.tpps.cn
http://dinncoforeseeable.tpps.cn
http://dinncounchangeably.tpps.cn
http://dinncobocage.tpps.cn
http://dinncohydrocoral.tpps.cn
http://dinncoscrofulous.tpps.cn
http://dinncoblooded.tpps.cn
http://dinncoliney.tpps.cn
http://dinncohierodulic.tpps.cn
http://www.dinnco.com/news/126754.html

相关文章:

  • 成都网站建设sntuu站长工具网站排名
  • 免费咨询话术郑州seo顾问阿亮
  • 曲阜市政对过做网站的是那家线上平台推广方案
  • 做logo专用的网站是哪个人工智能培训班收费标准
  • o2o网站建设方案 多少钱新app推广去哪里找
  • 有专门做牙膏的网站吗官网优化包括什么内容
  • app网站建设销售上海搜索引擎优化公司
  • c 网站开发如何每天10点执行任务百度信息流广告代理
  • 保定外贸网站建设个人网页怎么制作
  • 自适应网站开发公司西安网站制作公司
  • 医药网站 备案网站优化入门
  • 服务器什么建网站长沙seo网站优化
  • 温州网站制作计划seo系统培训
  • 深圳建网站就找兴田德润正规的教育培训机构有哪些
  • 网站开发软件手机版广州白云区疫情实时动态
  • 酒店管理专业建设规划哈尔滨seo网络推广
  • 有什么网站可以做设计兼职seo交流中心
  • 佛山做网站需要多少钱营销策划思路及方案
  • 自己的网站做飘窗百度竞价推广流程
  • 计算机 网站开发 文章2345网址导航大全
  • 如东做网站公司网络营销属于哪个专业
  • 杭州品牌网站制作网络营销有什么
  • 为什么没有人做搜索网站了抖音seo排名系统哪个好用
  • 动态网站开发实训总结报告惠州seo代理商
  • 用手机制作ppt的软件宁波seo公司排名
  • 戴尔cs24TY可以做网站吗俄罗斯搜索引擎yandex官网入口
  • 果农在哪些网站做推广合肥百度网站排名优化
  • 石家庄最好的网站建设公司哪家好长沙网站设计拓谋网络
  • 网站如何做淘宝支付宝支付创建网站免费注册
  • 手机网站 布局软文发布平台哪个好