Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Loading a external jars dynamically in a spring boot application @runtime

We have a spring boot application which is referring to a 3rd party jar . The 3rd party jar is having all getters and setters . But this external JAR keeps changing periodically . This external jar is places in shared location . Is there a way by which spring boot application will be made aware of new verion of external jar whenever its gets changed and spring boot should dynamically load the new external jar programmatically.

like image 312
Sat Avatar asked Jan 01 '26 22:01

Sat


1 Answers

@Sat....try this one credit goes to....

Dynamically add jars to SpringBoot at runtime

java -cp my-jar.jar -Dloader.path=external-jar.jar -Dloader.main=com.my.Application org.springframework.boot.loader.PropertiesLauncher

like image 132
kumar Avatar answered Jan 04 '26 12:01

kumar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!