一、SpringBoot 打包添加外部依赖

  1. <configuration>
  2. <includeSystemScope>true</includeSystemScope>
  3. </configuration>

项目如果依赖了本地jar包,需要打包部署 jar。
maven打包插件中加入下面:

  1. <build>
  2. <plugins>
  3. <plugin>
  4. <groupId>org.springframework.boot</groupId>
  5. <artifactId>spring-boot-maven-plugin</artifactId>
  6. <configuration>
  7. <includeSystemScope>true</includeSystemScope>
  8. </configuration>
  9. </plugin>
  10. </plugins>
  11. </build>

二、spring boot 打包

添加打包插件

  1. <plugins>
  2. <plugin>
  3. <groupId>org.springframework.boot</groupId>
  4. <artifactId>spring-boot-maven-plugin</artifactId>
  5. </plugin>
  6. </plugins>

双击下面这个,
image.png

等待完成
image.png

打包路径:D:**\qqMonitor\target\qqMonitor-2.1.1.RELEASE.jar

导入本地依赖,莫名的出现红色;

添加到classpath;
自动添加选择添加到classpath;