I am trying to figure out what is the best way to setup a spring boot application in such a way that its has its own jar dependencies but additional jars are added to classp
thank you @Ashraf Sarhan, you rescue my two days :) I added in pom file:
org.springframework.boot
spring-boot-maven-plugin
ZIP
true
vn.com.Mymainclass
com.vn.groupId
excluded-id-a
com.vn.groupId
excluded-id-b
repackage
And Placed ./lib folder containing two jars of two files which excluded above beside with my-main-spring-boot-app.jar file, and I ran:
java -Dloader.path="lib/" -jar my-main-spring-boot-app.jar
It worked perfectly.