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包都不存在了 

  • 相关阅读:
    对拍
    浅谈trie树
    蒟蒻的二分模板
    浅谈线性素数筛
    浅谈树状数组
    HDU 2181 哈密顿绕行世界问题
    HDU 3567 Eight II
    HDU 1043 Eight
    POJ 3076 Sudoku
    hihoCoder 1087 Hamiltonian Cycle
  • 原文地址:https://www.cnblogs.com/Leechg/p/12470501.html
Copyright © 2011-2022 走看看