当前位置:网站首页>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
边栏推荐
- Computer version wechat applet full screen display method, mobile phone horizontal screen method.
- (construction notes) grasp learning experience
- 【ManageEngine】IP地址扫描的作用
- 剑指Offer05. 替换空格
- (构造笔记)GRASP学习心得
- Introduction to concurrent programming (I)
- Flutter Widget : KeyedSubtree
- Atomic atomic operation
- Redis
- Wechat applet development - page Jump transfer parameters
猜你喜欢
使用BLoC 构建 Flutter的页面实例
New features of ES6
Basic knowledge of OpenGL (sort it out according to your own understanding)
Laravel time zone timezone
Sword finger offer03 Repeated numbers in the array [simple]
Sword finger offer07 Rebuild binary tree
剑指Offer06. 从尾到头打印链表
Integer int compare size
[official MySQL document] deadlock
[ManageEngine] the role of IP address scanning
随机推荐
2020-10_ Development experience set
wpa_ cli
Fluent: Engine Architecture
Redis
ES6新特性
flinksql是可以直接客户端建表读mysql或是kafka数据,但是怎么让它自动流转计算起来呢?
【嵌入式】---- 内存四区介绍
Qt+vtk+occt reading iges/step model
SystemVerilog -- OOP -- copy of object
init. RC service failed to start
Why can't my MySQL container start
The future of cloud computing cloud native
2020-09_ Shell Programming Notes
242. Effective letter heteronyms
[download attached] password acquisition tool lazagne installation and use
What is more elegant for flutter to log out and confirm again?
If you can't learn, you have to learn. Jetpack compose writes an im app (I)
Kubectl_ Command experience set
2.6 preliminary cognition of synergetic couroutines
OpenGL shader use