zoukankan      html  css  js  c++  java
  • SpringBoot maven 项目只打包自己的代码

    通用工具模块不必要完整的打包,而是只需要在打包的时候保留自己编写的代码

    • 添加依赖
    <dependency>
                <!-- generate jar without third part jars -->
                <groupId>org.springframework.boot.experimental</groupId>
                <artifactId>spring-boot-thin-layout</artifactId>
                <version>1.0.23.RELEASE</version>
            </dependency>
    • 添加插件配置
     <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                    <dependencies>
                        <dependency>
                            <!-- generate jar without third part jars -->
                            <groupId>org.springframework.boot.experimental</groupId>
                            <artifactId>spring-boot-thin-layout</artifactId>
                            <version>1.0.23.RELEASE</version>
                        </dependency>
                    </dependencies>
                    <executions>
                        <execution>
                            <goals>
                                <goal>repackage</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

    重新打包后就会发现所有的依赖jar包都不存在了 

  • 相关阅读:
    mysql忘记root密码解决办法
    laravel 获取所有表名
    跳转/传值(从页面到php文件)
    smarty foreach
    radio单选框
    dedecms实例化对象
    file_get_contents()
    if($a)
    bug解决思路
    git查看远程仓库地址
  • 原文地址:https://www.cnblogs.com/Leechg/p/12470501.html
Copyright © 2011-2022 走看看