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