maven将第三方依赖打进jar包
<plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <version>2.7.12</version> <configuration> <!-- 主启动类全类名 --> <mainClass>com.cloud.moudle.ServiceApplication</mainClass> <!-- 这个配置很重要,是将外部依赖打包进来的,如果没有该配置,打出来的jar包是不包含外部jar包的 --> <includeSystemScope>true</includeSystemScope> </configuration> <executions> <execution> <!--自定义 id --> <id>repackage</id> <!--插件目标 --> <goals> <goal>repackage</goal> </goals> </execution> </executions> </plugin>