spring-boot打包,引入外部jar包問題


引入本地jar包:

<dependency>
<groupId>com.jagregory.shiro.freemarker</groupId>
<artifactId>shiro-freemarker-tags</artifactId>
<version>0.1</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/shiro-freemarker-tags-0.1.jar</systemPath>
</dependency>


將本地的jar包,在package的時候加入到工程中

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>

<resources>
<resource>
<directory>src/main/resources/lib</directory>
<targetPath>BOOT-INF/lib/</targetPath>
<includes>
<include>**/*.jar</include>
</includes>
</resource>
</resources>
</build>


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM