Spring boot actual local jar package reference example

In some cases, you can't directly download the required jar packages through Maven warehouse. You can only download the jar packages locally for use. Loading third-party jar packages through Maven in the spring boot framework can be realized in the following ways (local jars are placed in the Lib / directory), and the project will be packaged as jar packages to run.

1. Add Maven dependency

After the above configuration, it can run normally in eclipse, but when it is compiled into a jar package, it will prompt that the relevant class cannot be found. The following configuration is required.

2. Adjust plugin parameters

The focus is on the extdirs configuration in compiler arguments

3. Adjust resources configuration

The packaged file format is:

The above is the whole content of this article. I hope it will be helpful to your study, and I hope you can support programming tips.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>