编程知识 cdmana.com

Spring boot is used to generate jar package and import external jar package

One 、 hit jar package
1、 stay A In the project , I want you to be jar Bag Java Code package , And then right-click Export
 Insert picture description here
2、 choice Java----》JAR file ----》 Click on Next next step , Choose where to export to , And just take a file name , It is derived here jar Completed
 Insert picture description here
Two 、 Introduce the outside jar package (java project www.fhadmin.org)
1、 stay B In the project , newly build lib Folder , Just hit it jar Copy the package into a lib In the folder

 Insert picture description here
2、pom.xml In file , Configuration dependency ,systemPath The path must be right , Here you can use the function normally
 Insert picture description here
3、maven Packaging for jar When you file , stay pom.xml Add the following code to the file , solve scope by system Of jar Bags can't be packed into jar file , If you don't add the following code , pack B Project will be missing A Project dependency

 Insert picture description here

版权声明
本文为[FH-Admin]所创,转载请带上原文链接,感谢
https://cdmana.com/2020/12/20201224121944888k.html

Scroll to Top