国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

maven打包spring boot jar沒有 BOOT-INF目錄解決方案

這篇具有很好參考價值的文章主要介紹了maven打包spring boot jar沒有 BOOT-INF目錄解決方案。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點擊"舉報違法"按鈕提交疑問。

##查看項目里面是否有引入spring-boot-maven-plugin

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

##如果有引入,還不行

##查看pom.xml是否有pluginManagement標(biāo)簽,去掉pluginManagement就行了

<build>
    <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
      <plugins>
        <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
        <plugin>
          <artifactId>maven-clean-plugin</artifactId>
          <version>3.1.0</version>
        </plugin>
        <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.0.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.8.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.22.1</version>
        </plugin>
        <plugin>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
        <plugin>
          <artifactId>maven-install-plugin</artifactId>
          <version>2.5.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.8.2</version>
        </plugin>
        <!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
        <plugin>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.7.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>3.0.0</version>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

##去掉pluginManagement標(biāo)簽文章來源地址http://www.zghlxwxcb.cn/news/detail-801977.html

<build>
      <plugins>
        <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
        <plugin>
          <artifactId>maven-clean-plugin</artifactId>
          <version>3.1.0</version>
        </plugin>
        <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.0.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.8.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.22.1</version>
        </plugin>
        <plugin>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
        <plugin>
          <artifactId>maven-install-plugin</artifactId>
          <version>2.5.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.8.2</version>
        </plugin>
        <!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
        <plugin>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.7.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>3.0.0</version>
        </plugin>
      </plugins>
  </build>

到了這里,關(guān)于maven打包spring boot jar沒有 BOOT-INF目錄解決方案的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實不符,請點擊違法舉報進行投訴反饋,一經(jīng)查實,立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費用

相關(guān)文章

  • IDEA 打包報錯 maven打包報錯 spring-boot-maven-plugin 與spring-boot 版本的兼容性

    IDEA 打包報錯 maven打包報錯 spring-boot-maven-plugin 與spring-boot 版本的兼容性

    報錯信息如下: org/springframework/boot/maven/RepackageMojo has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0 或者 ClassNotFoundException: org.apache.commons.compress.archivers.jar.JarArchiveEntry 解決辦法: 排查打包是否使

    2024年02月15日
    瀏覽(92)
  • Spring Boot項目使用Maven打包并帶上依賴

    在這篇博客中,介紹如何使用Maven將Spring Boot項目及其依賴項打包成一個可執(zhí)行的jar文件。我們將使用Spring Boot的 spring-boot-maven-plugin 插件來完成這個任務(wù)。 在你的 pom.xml 文件中,你需要添加或更新 build 部分以使用 spring-boot-maven-plugin 插件。下面是一個示例配置: 在這個配置中

    2024年02月16日
    瀏覽(24)
  • Spring Boot引用外部JAR包和將自己的JAR包發(fā)布到本地Maven庫

    Spring Boot引用外部JAR包和將自己的JAR包發(fā)布到本地Maven庫

    Spring Boot 項目可以通過在項目中引入外部 JAR 包來增強功能。以下是使用Spring Boot引用外部JAR包的步驟: 將外部JAR包添加到項目中,可以通過直接將JAR包復(fù)制到項目目錄下的“l(fā)ib”目錄中,或者使用Maven的方式添加依賴。 在 Spring Boot 項目的 pom.xml 文件中添加依賴聲明。如果使

    2024年02月01日
    瀏覽(24)
  • [Spring Boot] 開發(fā)時可以運行,但Maven打包后,無法運行

    [Spring Boot] 開發(fā)時可以運行,但Maven打包后,無法運行

    問題:開發(fā)過程中一切正常,但在打包后,使用java -jar運行jar包時報錯 Exception in thread \\\"main\\\" java.lang.UnsupportedClassVersionError: org/springframework/boot/loader/JarLauncher has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versi

    2024年02月10日
    瀏覽(18)
  • 系列二十九、Spring Boot打成jar包后,resources目錄下的資源文件獲取不到

    ? ? ? ? 在做公司業(yè)務(wù)開發(fā)時,有一個地方是使用EasyExcel模板技術(shù)進行文件上傳,測試環(huán)境是OK的,但是和前后端聯(lián)調(diào)驗證測試通過后,上傳到生產(chǎn)環(huán)境就不行了,后來也是花費了很多時間才找出其中的問題,以下為解決方案。 ?

    2024年02月02日
    瀏覽(30)
  • Maven打包失敗--Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:no found...

    Maven打包失敗--Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:no found...

    1、問題還原,無論怎樣操作,打包都是失敗 Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.3.4.RELEASE:repackage (repackage) on project guigu-common: Execution repackage of goal org.springframework.boot:spring-boot-maven-plugin:2.3.4.RELEASE:repackage failed: Unable to find main class - [Help 1] [ERROR] ?2、這個問

    2024年02月03日
    瀏覽(94)
  • SpringBoot 插件 spring-boot-maven-plugin 原理,以及SpringBoo工程部署的 jar 包瘦身實戰(zhàn)

    SpringBoot 插件 spring-boot-maven-plugin 原理,以及SpringBoo工程部署的 jar 包瘦身實戰(zhàn)

    我們直接使用 maven package (maven自帶的package打包功能),打包Jar包的時候,不會將該項目所依賴的Jar包一起打進去,在使用 java -jar 命令啟動項目時會報錯,項目無法正常啟動。這個時候,我們就可以考慮引用 spring-boot-maven-plugin 插件來為項目打Jar包。 maven項目的pom.xml中,添

    2024年02月06日
    瀏覽(24)
  • 解決引入spire.doc.free-3.9.0.jar導(dǎo)致spring boot項目無法使用maven的install問題

    解決引入spire.doc.free-3.9.0.jar導(dǎo)致spring boot項目無法使用maven的install問題

    問題背景: 在一個項目中需求中需要導(dǎo)出一個word模板,那之前有做過一個這個類似需求,這次使用的是freemarker模版。在引入spire.doc.free-3.9.0.jar依賴的時候發(fā)現(xiàn)maven依賴報紅色,懸浮提示aliyun找不到改包,沒有太在意這個部分,本地能夠正常使用。本地倉庫存在這個jar包,并

    2024年02月15日
    瀏覽(38)
  • 解決IntelliJ IDEA執(zhí)行maven打包,執(zhí)行java -jar命令提示jar中沒有主清單屬性

    解決IntelliJ IDEA執(zhí)行maven打包,執(zhí)行java -jar命令提示jar中沒有主清單屬性

    IDEA執(zhí)行 mvn clean package -DskipTest=true 命令或者借助工具的 Maven菜單 進行打包操作,然后執(zhí)行 java -jar app.jar 命令后,提示jar中沒有主清單屬性 這個錯誤通常是由于生成的JAR文件缺少一個主清單屬性引起的。在使用 java -jar 命令運行JAR文件時,JVM需要查找JAR文件中包含 Main-Class 屬

    2024年02月05日
    瀏覽(27)
  • unidbg-boot-server使用并打包jar調(diào)用

    unidbg-boot-server使用并打包jar調(diào)用

    其實線上使用可以多種方式,比如pom引入spring boot自己去寫一個接口實現(xiàn); 但如果并發(fā)不是很高,可以使用synchronized進行,若對并發(fā)有要求,建議直接使用 unidbg-boot-server開源項目; 從github下拉,https://github.com/anjia0532/unidbg-boot-server 常見問題:https://github.com/anjia0532/un

    2024年02月11日
    瀏覽(19)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包