当前位置:网站首页>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
边栏推荐
- If you can't learn, you have to learn. Jetpack compose writes an im app (I)
- Flutter 退出登录二次确认怎么做才更优雅?
- Atomic atomic operation
- JVM memory model
- 4000字超详解指针
- adb push apk
- PHP導出word方法(一mht)
- Fundamentals of concurrent programming (III)
- [official MySQL document] deadlock
- PHP get the file list and folder list under the folder
猜你喜欢

为什么我的mysql容器启动不了呢

剑指Offer07. 重建二叉树

云计算未来 — 云原生

(构造笔记)ADT与OOP
![Sword finger offer03 Repeated numbers in the array [simple]](/img/cf/c1ad2f2a45560b674b5b8c11fed244.png)
Sword finger offer03 Repeated numbers in the array [simple]

Eureka自我保护

Symlink(): solution to protocol error in PHP artisan storage:link on win10

PHP導出word方法(一mht)

Self made pop-up input box, input text, and click to complete the event.

雲計算未來 — 雲原生
随机推荐
写一个简单的nodejs脚本
[ManageEngine] the role of IP address scanning
Flutter: self study system
Socket TCP for network communication (I)
flinksql是可以直接客户端建表读mysql或是kafka数据,但是怎么让它自动流转计算起来呢?
Dart: about Libraries
Basic knowledge of OpenGL (sort it out according to your own understanding)
023 ([template] minimum spanning tree) (minimum spanning tree)
(构造笔记)MIT reading部分学习心得
PHP export word method (one MHT)
2.7 overview of livedata knowledge points
Flutter 退出登录二次确认怎么做才更优雅?
RedHat5 安装Socket5代理服务器
Shell: basic learning
The future of cloud computing cloud native
Sword finger offer10- I. Fibonacci sequence
Slf4j log facade
OpenGL index cache object EBO and lineweight mode
(construction notes) learning experience of MIT reading
【嵌入式】---- 内存四区介绍