mirror of
				https://gitee.com/bookshelfplus/bookshelfplus
				synced 2025-11-04 12:23:10 +08:00 
			
		
		
		
	jar包打包时不将依赖打入其中,减少jar包大小
This commit is contained in:
		@@ -326,6 +326,32 @@
 | 
			
		||||
                <groupId>org.springframework.boot</groupId>
 | 
			
		||||
                <artifactId>spring-boot-maven-plugin</artifactId>
 | 
			
		||||
                <version>2.5.12</version>
 | 
			
		||||
 | 
			
		||||
                <!--
 | 
			
		||||
                以下是将 jar 包中 BOOT-INF/lib 中的依赖 jar 包排除
 | 
			
		||||
                refer: https://mp.weixin.qq.com/s/xPRNlIT9Ac4STKzMRyUhqQ
 | 
			
		||||
 | 
			
		||||
                [Tips] 如果希望将完整依赖打包到 jar 包中,请注释掉下面
 | 
			
		||||
                <configuration> 和 <executions> 两个标签
 | 
			
		||||
                -->
 | 
			
		||||
                <!-- start -->
 | 
			
		||||
                <configuration>
 | 
			
		||||
                    <layout>ZIP</layout>
 | 
			
		||||
                    <includes>
 | 
			
		||||
                        <include>
 | 
			
		||||
                            <groupId>nothing</groupId>
 | 
			
		||||
                            <artifactId>nothing</artifactId>
 | 
			
		||||
                        </include>
 | 
			
		||||
                    </includes>
 | 
			
		||||
                </configuration>
 | 
			
		||||
                <executions>
 | 
			
		||||
                    <execution>
 | 
			
		||||
                        <goals>
 | 
			
		||||
                            <goal>repackage</goal>
 | 
			
		||||
                        </goals>
 | 
			
		||||
                    </execution>
 | 
			
		||||
                </executions>
 | 
			
		||||
                <!-- end -->
 | 
			
		||||
            </plugin>
 | 
			
		||||
 | 
			
		||||
            <!-- 拉姆达表达式需要支持 Java 8 语法 -->
 | 
			
		||||
 
 | 
			
		||||
@@ -137,6 +137,9 @@ public class QCloudCosUtils {
 | 
			
		||||
        return url.toString();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 销毁 CosClient 对象方法
 | 
			
		||||
     */
 | 
			
		||||
    public static void destoryInstance() {
 | 
			
		||||
        if (_cosClient != null) {
 | 
			
		||||
            // 确认本进程不再使用 cosClient 实例之后,关闭之
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1
									
								
								bookshelfplus/使用D盘temp file目录下依赖运行.bat
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								bookshelfplus/使用D盘temp file目录下依赖运行.bat
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
java -Dloader.path=D:\temp\lib -jar target/bookshelfplus-1.0-SNAPSHOT.jar
 | 
			
		||||
		Reference in New Issue
	
	Block a user