Springboot手动引入jar

2022-07-11

springboot手动引入外部jar包示例

一、将jar包放在resource下

image.png

二、在pom中引用

  • 要求scope=system ```xml
com.aspose aspose-words 18.8 system ${project.basedir}/src/main/resources/libs/aspose-words-18.8.jar
## 三、在maven中配置打包时包含本地jar
```xml
<build>
  <plugins>
    <plugin>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-maven-plugin</artifactId>
      <configuration>
        <includeSystemScope>true</includeSystemScope>
      </configuration>
    </plugin>
  </plugins>
</build>