zoukankan      html  css  js  c++  java
  • SpringBoot Jar 包太大 瘦身 【初试】

    SpringBoot Jar 包太大 瘦身,建议使用时,参考: SpringBoot Jar 包太大 瘦身 【终极版】

     29M,

    排除少量JAR包方式

    打包,排除指定jar 包

    <build>
            <plugins>
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                    <configuration>
                        <layout>ZIP</layout>
                        <excludes>
                            <exclude>
                                <groupId>com.alibaba</groupId>
                                <artifactId>fastjson</artifactId>
                            </exclude>
                            <exclude>
                                <groupId>cn.hutool</groupId>
                                <artifactId>hutool-all</artifactId>
                            </exclude>
                        </excludes>
                    </configuration>
                </plugin>
            </plugins>
        </build>

    重新打包后发现,依赖jar没有包括在 nacos-im-server.jar 中【用 Compare 比较工具时,可能还会看到,这时候要右击刷新一下】

     运行

    java -Dloader.path=D:OpenSourceNettyVipIMlib -jar ./nacos-im-server-1.0.jar

     

  • 相关阅读:
    hdu 5072 Coprime (容斥)
    洛谷 P1411 树 (树形dp)
    Tr/ee AtCoder
    sys.path
    uname
    sys.platform
    Eclipse Basic
    Eclipse Color Theme
    Pydev
    scons
  • 原文地址:https://www.cnblogs.com/vipsoft/p/15218845.html
Copyright © 2011-2022 走看看