当前位置:网站首页>Idea packages the web project into a war package and deploys it to the server to run
Idea packages the web project into a war package and deploys it to the server to run
2022-07-03 12:32:00 【Mulberry blossoms on the street】
idea take web Package the project into war Package and deploy to the server to run
The following is a summary of the work case :
1. First idea Configure server :tomcat Server or jetty Server can

2.idea Configure environment settings : Click on the following Icon


The next operation is as follows :
2.1 Set up project

2.2 Set up Modules

2.3 Set up Librabers

2.4 Set up Facets

2.5 Set up Artifacts( a key : Pay attention to the order , First Exploded after Archive)


Specify :

Additional explanation :
Name: yes war The name of the bag , You can define it yourself
Type: It's the type , Here is Archive The type of , That is to say war Packet type
Output directory: yes war Where packages are stored , It can be modified at will , Find a good location to store
Include in project build: If this option is checked , Explain that when the current module modifies the code or something , After recompiling , This war The package will also be updated and modified synchronously
Output Layout: Is the output layout , That is to say war The directory structure of the package , Here's the choice J2SE modular , natural war The final structure of the package is and J2SE Modular webapps The directory structure under is the same .
As for the hint in the lower left corner :META-INF/MANIFEST.MF Don't worry if you don't find the document , This file mainly stores the main classes , There is a main Location of the method class
2.5 Set up jdk

3. Compile the package :Build Artifacts...----Build


Additional explanation :
All Artifact: Operate all modules
Build: Compile and package
Rebuild: Reproduce compilation and packaging , Will delete the original war package , Then compile and package
Clean: eliminate war package
Edit: Re edit war Package settings
Check after compilation war package :

remarks :
war The contents of the package are all from exploded It's a copy of , So if war I found something missing when I packed the bag , It's usually this exploded It's missing , You need to manually paste the missing file to exploded in , And repackage . Generally, when we deploy files to the browser for testing , All deployment exploed file , Because this file has war Package like directory structure .
4. take war Put the package on the server (tomcat perhaps jetty The server )
How to decompress war package : Following commands :
unzip -o J2SE.war -d J2SE
more linux Common commands, please check :Linux Common commands
边栏推荐
猜你喜欢

剑指Offer09. 用两个栈实现队列

If you can't learn, you have to learn. Jetpack compose writes an im app (I)

剑指Offer03. 数组中重复的数字【简单】

PHP export word method (phpword)

云计算未来 — 云原生

Sword finger offer06 Print linked list from end to end

Shutter: overview of shutter architecture (excerpt)

1-2 project technology selection and structure

C language improvement article (wchar_t) character type

Sword finger offer05 Replace spaces
随机推荐
How to deploy web pages to Alibaba cloud
Basic knowledge of OpenGL (sort it out according to your own understanding)
What is more elegant for flutter to log out and confirm again?
TOGAF认证自学宝典V2.0
实现验证码验证
Adult adult adult
145. Post order traversal of binary tree
239. Sliding window maximum
(构造笔记)从类、API、框架三个层面学习如何设计可复用软件实体的具体技术
云计算未来 — 云原生
elastic_ L02_ install
(構造筆記)從類、API、框架三個層面學習如何設計可複用軟件實體的具體技術
(database authorization - redis) summary of unauthorized access vulnerabilities in redis
Is it OK to open an account for online stock speculation? Is the fund safe?
(构造笔记)ADT与OOP
【嵌入式】---- 内存四区介绍
Is it safe to open an account for online stock speculation? Who can answer
Symlink(): solution to protocol error in PHP artisan storage:link on win10
剑指Offer09. 用两个栈实现队列
ES6 standard