springboot启动时加载外部jar包
一、打包时不包含依赖
修改pom.xml
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<includes>
<include>
<groupId>nothing</groupId>
<artifactId>nothing</artifactId>
</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
二、启动时加载外部依赖
java -cp springboot-demo.jar:lib/* org.springframework.boot.loader.JarLauncher
需要指定多个jar或目录时,linux下使用冒号分隔,windows下使用分号分隔
标题:springboot启动时加载外部jar包
作者:llilei
地址:http://solo.llilei.work/articles/2022/10/11/1665454278550.html