zoukankan      html  css  js  c++  java
  • spring-boot-dependencies jar 不完整的问题

    集成 springboot 有两种方式。

    1 直接 父项目指向  springboot 

      

    <parent>
    		<groupId>org.springframework.boot</groupId>
    		<artifactId>spring-boot-starter-parent</artifactId>
    		<version>2.0.3.RELEASE</version>
    	</parent>
    

      这种用起来很方便 ,默认打出的jar 也是完整的。

    2 使用  spring-boot-dependencie 

    <!-- springcloud -->
    	<dependencyManagement>
    		<dependencies>
    			
    			<dependency>
    				<groupId>org.springframework.boot</groupId>
    				<artifactId>spring-boot-dependencies</artifactId>
    				<version>2.0.3.RELEASE</version>
    				<type>pom</type>
    				<scope>import</scope>
    			</dependency>
    		</dependencies>
    	</dependencyManagement>
    

      这种默认打出的jar包是不完整的。 不能直接运行。

    加入下面的配置就可以了

    	<build>
    	    <plugins>
    	        <plugin>
    	            <groupId>org.springframework.boot</groupId>
    	            <artifactId>spring-boot-maven-plugin</artifactId>
    	            <configuration>
    	                <mainClass>com.sbl.pay.subaccount.SubaccountServerRunner</mainClass>
    	            </configuration>
    	            <executions>
    	                <execution>
    	                    <goals>
    	                        <goal>repackage</goal>
    	                    </goals>
    	                </execution>
    	            </executions>
    	        </plugin>
    	    </plugins>
    	</build>
    

      

    第二种麻烦一点,但是我们可以使用自己的父类。

  • 相关阅读:
    以太坊公开拍卖智能合约案例
    部署智能合约
    ERC20 Token
    查看crontab运行状态
    php把excel数值格式转成日期格式
    PHP识别中文编码并自动转换为UTF-8
    python中文件内容替换
    mysqldump备份指定的数据
    linux设置服务器时间
    git常用命令
  • 原文地址:https://www.cnblogs.com/cxygg/p/9559618.html
Copyright © 2011-2022 走看看