天天看点

spring boot maven项目打包后本地jar包没有打进项目的问题解决办法

 在添加maven-war-plugin插件的时候设置将本地jar包打进项目

<plugin>
          <artifactId>maven-war-plugin</artifactId>
          <version>3.2.2</version>
          <configuration>
            <webResources>
              <resource>
                <directory>src/lib/</directory>
                <targetPath>WEB-INF/lib</targetPath>
                <includes>
                  <include>**/*.jar</include>
                </includes>
              </resource>
            </webResources>
          </configuration>
        </plugin>