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

  • 添加依赖
<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包都不存在了 

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-23
  • 2021-06-15
  • 2021-10-24
  • 2021-12-17
  • 2021-04-13
  • 2021-11-30
  • 2021-08-27
相关资源
相似解决方案