Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the second way for IDEA to jar the springboot project?

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

In this issue, the editor will bring you about the second method of IDEA's jar package for springboot projects. The article is rich in content and analyzed and described from a professional point of view. I hope you can get something after reading this article.

I have previously introduced how IDEA uses maven to pack jar packages. Sprint boot projects use jar packages. However, this approach has a drawback. If the project manually imports other jar packages in addition to the jar packages introduced by maven, the packaging will fail and report a calssnotfound error. Maven packaging can only see the packages introduced by maven, not manually introduced packages. In this case, the method described in this article can be used. Open the IDEA project, the shortcut key Ctrl+Shift+Alt+S opens the left side of the Project Structure, click Aritfacts, the pop-up box Moudule will automatically identify the project name, Main Class click the arrow, a browsing window will appear, a moment will automatically identify the startup class, click on the selection line. Check the copy to the output option below, the lower directory must select the resource directory, do not choose the default java directory, some blogs also tell java directory, is wrong. Click OK after configuration. The following figure is all right by default. Remember that the output directory,jar package appears here.

Select build- > build artifacts from the top menu of IDEA

The build menu appears in the code editing area

Click build and rebuild. Wait a moment for build to finish. You can see a series of jar packages in the output directory. The arrow refers to the jar package that will eventually be run, and other jar packages in the same directory are dependent packages. Cmd executes the jar package and starts successfully. The disadvantage of this method is that the finished package is not a jar package, and if you want to run it on the server, you need to upload the entire directory to the server in order to run jar, because other dependent packages of the directory are also required. The above is the second way for the editor to share IDEA's jar package for springboot projects. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report