IDEA springBoot project to add a third-party jar package

1, add lib directory with the src directory at the same level.
2, choose to join the project lib

3, pom.xml file
      <dependency>
            <groupId>com.test.util</groupId>
            <artifactId>com.test.util</artifactId>
            <version>1.0</version>
            <scope>system</scope>
            <systemPath>${project.basedir}/lib/test.jar</systemPath>
        </dependency>

    <!--引入本地资源-->
        <resources>
            <resource>
                <directory>lib</directory>
                <targetPath>BOOT-INF/lib/</targetPath>
                <includes>
                    <include>**/*.jar</include>
                </includes>
            </resource>
        </resources>

 

Guess you like

Origin www.cnblogs.com/pengjf/p/11276985.html