<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                ### 80.10 使用Ant構建可執行存檔(不使用spring-boot-antlib) 想要使用Ant進行構建,你需要抓取依賴,編譯,然后像通常那樣創建一個jar或war存檔。為了讓它可以執行,你可以使用`spring-boot-antlib`,也可以使用以下指令: 1. 如果構建jar,你需要將應用的類和資源打包進內嵌的`BOOT-INF/classes`目錄。如果構建war,你需要將應用的類打包進內嵌的`WEB-INF/classes`目錄。 2. 對于jar,添加運行時依賴到內嵌的`BOOT-INF/lib`目錄。對于war,則添加到`WEB-INF/lib`目錄。注意不能壓縮存檔中的實體。 3. 對于jar,添加`provided`依賴到內嵌的`BOOT-INF/lib`目錄。對于war,則添加到`WEB-INF/lib-provided`目錄。注意不能壓縮存檔中的實體。 4. 在存檔的根目錄添加`spring-boot-loader`類(這樣`Main-Class`就可用了)。 5. 使用恰當的啟動器,比如對于jar使用`JarLauncher`作為manifest的`Main-Class`屬性,指定manifest的其他屬性,特別是`Start-Class`。 示例: ```xml <target name="build" depends="compile"> <jar destfile="target/${ant.project.name}-${spring-boot.version}.jar" compress="false"> <mappedresources> <fileset dir="target/classes" /> <globmapper from="*" to="BOOT-INF/classes/*"/> </mappedresources> <mappedresources> <fileset dir="src/main/resources" erroronmissingdir="false"/> <globmapper from="*" to="BOOT-INF/classes/*"/> </mappedresources> <mappedresources> <fileset dir="${lib.dir}/runtime" /> <globmapper from="*" to="BOOT-INF/lib/*"/> </mappedresources> <zipfileset src="${lib.dir}/loader/spring-boot-loader-jar-${spring-boot.version}.jar" /> <manifest> <attribute name="Main-Class" value="org.springframework.boot.loader.JarLauncher" /> <attribute name="Start-Class" value="${start-class}" /> </manifest> </jar> </target> ``` 該[Ant示例](https://github.com/spring-projects/spring-boot/tree/v1.4.1.RELEASE/spring-boot-samples/spring-boot-sample-ant)中有一個`build.xml`文件及`manual`任務,可以使用以下命令來運行: ```shell $ ant -lib <folder containing ivy-2.2.jar> clean manual ``` 在上述操作之后,你可以使用以下命令運行該應用: ```shell $ java -jar target/*.jar ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看