Explain in detail how spring boot introduces external jar packages

Due to the requirements of the project, the interface of SMS verification code needs to be changed to Ali greater than. However, it is embarrassing to find that the jar package of Ali greater than does not have Maven version, so we started the road of fuck leading the package all morning. According to the routine, it should be Baidu's first wave. However, Baidu has found many schemes for a long time and found that none of them is useful. Moreover, the plagiarism and copying of the article are very serious. It is wrong to try n schemes and did not package the external jar package under the book-inf file folder. Finally, after the nth attempt, the external jar package is finally imported into the typed jar package. It is hereby recorded to prevent recurrence!!!

First, create a new LIBS folder (under the root directory or resource directory), and put the jars to be imported into it

Then add the following configuration to POM and tell Maven to import the local jar

Except that the SystemPath configuration tells Maven the location of the local jar package introduced, other configurations can be written freely

Focus!!! Knock on the blackboard!!! The following step of configuration is also the most important step. The lack of such a step in many online tutorials will lead to that although it can be run locally, it can't be packaged with maven, because Maven doesn't also type the local jar into the generated package

In POM, set the includesystemscope parameter for the packaged plug-in of spring boot

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
分享
二维码
< <上一篇
下一篇>>