中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

SpringBoot工程打包插件

發布時間:2020-10-18 22:09:04 來源:網絡 閱讀:2822 作者:zcp617504296 欄目:軟件技術

springboot的打包插件的配置文件參考如下:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

    <groupId>com.zcp.springboot</groupId>

    <artifactId>webGateWay</artifactId>

    <version>1.0</version>

    <packaging>jar</packaging>

<parent>

<groupId>org.springframework.boot</groupId>

<artifactId>spring-boot-starter-parent</artifactId>

<version>1.5.2.RELEASE</version>

</parent>


<dependencies>

<!-- 測試的時候注釋的 -->

<!-- <dependency>

<groupId>org.springframework</groupId>

<artifactId>spring-webmvc</artifactId>

</dependency> -->

<dependency>

<groupId>org.springframework.retry</groupId>

<artifactId>spring-retry</artifactId>

<version>1.1.4.RELEASE</version>

</dependency>

<!-- 連接池 -->

<dependency>

<groupId>com.jolbox</groupId>

<artifactId>bonecp-spring</artifactId>

<version>0.8.0.RELEASE</version>

</dependency>

<dependency>

<groupId>org.springframework.boot</groupId>

<artifactId>spring-boot-starter-web</artifactId>

</dependency>

<dependency>

<groupId>org.springframework.batch</groupId>

<artifactId>spring-batch-core</artifactId>

</dependency>

<!-- MySql -->

<dependency>

<groupId>mysql</groupId>

<artifactId>mysql-connector-java</artifactId>

<version>5.1.34</version>

</dependency>

<dependency>

<groupId>org.springframework.boot</groupId>

<artifactId>spring-boot-starter-jdbc</artifactId>

<version>1.5.6.RELEASE</version>

</dependency>

<dependency>

<groupId>com.google.code.gson</groupId>

<artifactId>gson</artifactId>

</dependency>


<dependency>

<groupId>com.alibaba</groupId>

<artifactId>fastjson</artifactId>

<version>1.2.29</version>

</dependency>

<dependency>

<groupId>com.alibaba</groupId>

<artifactId>fastjson</artifactId>

<version>1.1.41</version>

</dependency>

<dependency>

<groupId>org.codehaus.jackson</groupId>

<artifactId>jackson-mapper-asl</artifactId>

<version>1.9.13</version>

</dependency>

<dependency>

<groupId>commons-io</groupId>

<artifactId>commons-io</artifactId>

<version>2.2</version>

</dependency>

<dependency>

<groupId>org.springframework.boot</groupId>

<artifactId>spring-boot-starter-redis</artifactId>

<version>1.3.7.RELEASE</version>

</dependency>

<dependency>

<groupId>org.springframework.boot</groupId>

<artifactId>spring-boot-starter-jdbc</artifactId>

<version>1.5.6.RELEASE</version>

</dependency>

<dependency>

<groupId>org.springframework</groupId>

<artifactId>spring-jdbc</artifactId>

<version>4.0.5.RELEASE</version>

</dependency>

<dependency>

<groupId>org.mybatis.spring.boot</groupId>

<artifactId>mybatis-spring-boot-starter</artifactId>

<version>1.2.0</version>

</dependency>

        <dependency>

            <groupId>mysql</groupId>

            <artifactId>mysql-connector-java</artifactId>

            <version>5.1.34</version>

        </dependency>


<!-- <dependency>

            <groupId>org.mybatis.spring.boot</groupId>

            <artifactId>mybatis-spring-boot-starter</artifactId>

            <version>1.1.1</version>

        </dependency> -->

        

      <!--   <dependency>

            <groupId>mysql</groupId>

            <artifactId>mysql-connector-java</artifactId>

        </dependency> -->




        <dependency>

        <groupId>org.apache.ibatis</groupId>

        <artifactId>ibatis-sqlmap</artifactId>

        <version>2.3.4.726</version>

        </dependency>

        

         <dependency>

        <groupId>javax.servlet</groupId>

        <artifactId>servlet-api</artifactId>

        <version>2.5</version>

        </dependency>

        

        <dependency>

<groupId>org.springframework.boot</groupId>

<artifactId>spring-boot-starter-tomcat</artifactId>

<scope>provided</scope>

</dependency>

<!-- 模板引擎 -->

        <!-- <dependency>

        <groupId>org.springframework.boot</groupId>

        <artifactId>spring-boot-starter-thymeleaf</artifactId>

        </dependency> -->

        <dependency>

        <groupId>org.apache.tomcat</groupId>

        <artifactId>tomcat-jdbc</artifactId>

        <version>8.0.36</version>

        </dependency>

        <dependency>

        <groupId>org.springframework.boot</groupId>

        <artifactId>spring-boot-starter</artifactId>

        </dependency>

</dependencies>

<build>

<finalName>${project.artifactId}</finalName>

<plugins>

<!-- 資源文件拷貝插件 -->

<!-- <plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-resources-plugin</artifactId>

<configuration>

<encoding>UTF-8</encoding>

</configuration>

</plugin> -->

<!-- java編譯插件 -->

<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-compiler-plugin</artifactId>

<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>

<configuration>

<mainClass>com.dcits.webgateway.Main</mainClass>

</configuration>

</plugin>

</plugins>

<pluginManagement>

<plugins>

<!-- 配置Tomcat插件 -->

<!--

<plugin>

<groupId>org.apache.tomcat.maven</groupId>

<artifactId>tomcat7-maven-plugin</artifactId>

<version>2.2</version>

</plugin> -->

<plugin>  

   <groupId>org.codehaus.mojo</groupId>  

   <artifactId>appassembler-maven-plugin</artifactId>  

   <version>1.10</version>  

   <configuration>  

       <!-- 生成linux, windows兩種平臺的執行腳本 -->  

       <platforms>  

           <platform>windows</platform>  

           <platform>unix</platform>  

       </platforms>  

       <!-- 根目錄 -->  

       <assembleDirectory>${project.build.directory}/WEBGATEWAY</assembleDirectory>  

       <!-- 打包的jar,以及maven依賴的jar放到這個目錄里面 -->  

       <repositoryName>lib</repositoryName>  

       <!-- 可執行腳本的目錄 -->  

       <binFolder>bin</binFolder>  

       <!-- 配置文件的目標目錄 -->  

       <configurationDirectory>conf</configurationDirectory>  

       <!-- 拷貝配置文件到上面的目錄中 -->  

       <copyConfigurationDirectory>true</copyConfigurationDirectory>  

       <!-- 從哪里拷貝配置文件 (默認src/main/config) -->  

       <configurationSourceDirectory>src/main/resources</configurationSourceDirectory>  

       <!-- lib目錄中jar的存放規則,默認是${groupId}/${artifactId}的目錄格式,flat表示直接把jar放到lib目錄 -->  

       <repositoryLayout>flat</repositoryLayout>  

       <encoding>UTF-8</encoding>  

       <logsDirectory>logs</logsDirectory>  

       <tempDirectory>tmp</tempDirectory>  

       <programs>  

           <program>  

               <id>start</id>  

               <!-- 啟動類 -->  

               <mainClass>com.dcits.webgateway.Main</mainClass>

               <jvmSettings>  

                   <extraArguments>  

                       <extraArgument>-server</extraArgument>  

                       <extraArgument>-Xmx1G</extraArgument>  

                       <extraArgument>-Xms1G</extraArgument>  

                   </extraArguments>  

               </jvmSettings>  

           </program>  

       </programs>  

   </configuration>  

</plugin> 

</plugins>

</pluginManagement>

</build>

</project>



常見打包命令:

clean package

用maven的assassembler插件打包

mvn clean package appassembler:assemble

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

遂平县| 隆德县| 德州市| 邵阳县| 瑞金市| 遵化市| 同仁县| 确山县| 新宾| 武穴市| 大方县| 漳平市| 洪雅县| 浑源县| 海口市| 遵义县| 北京市| 梅河口市| 肃北| 盐山县| 乌海市| 福建省| 临沭县| 海盐县| 海林市| 满城县| 凤翔县| 剑阁县| 偃师市| 望江县| 峨山| 江永县| 漠河县| 古丈县| 建瓯市| 简阳市| 奉化市| 怀化市| 资中县| 大理市| 桃园县|