当前位置:网站首页>Make Jar, Not War
Make Jar, Not War
2022-07-05 20:33:00 【Small box】
Around the 4 Years ago , About java The application is finally marked jar
Package or war
The choice of bag makes me confused .
At that time, more applications were made war
Bag , Even if we know it can be played jar
package , But before, they were beaten war
package , And it seems to be jar
There are no obvious benefits of the bag .
But what puzzled me at that time was that more and more practices were turning to fight without giving much reason jar
package , So I began to think ......
war Reasons for the package
In a large OTA Inside the enterprise , The application is still marked war
package , PaaS The platform will be automatically installed and configured tomcat, I know this is for web server It is good for unified configuration and operation and maintenance . be based on war
Behind the series CI/CD 、DevOps The process must have corresponding adaptation , Even if jar
There are some advantages I don't know, and it's impossible to use them inside large enterprises overnight , The platform and system need to be adjusted .
SpringBoot At that time, it was not as popular as it is now , This does not mean that people do not use it , I mean relatively new projects , There will be many inside the enterprise “ Old system ” Need to maintain , We can't expect to replace these old systems with new technology stacks at once , Just like you know now web application
Generally, the front and back ends are developed separately , But if you take over a use jsp
The old guy , You have to maintain that it's not ?
jar Era
Times are different , It seems like decades have passed , But in fact, it's only a few years . But just a few years is enough to change the face of some things .
Now , Cloud native 、 Micro services are popular , It seems that everyone has been very adapted to this development mode , No one is bothered about whether to use SpringBoot, It will only discuss whether the version used is high or low . Not to mention the packaging , It's natural to use jar
, Although this kind of looks “ Best practices ”, In the long-term development process, it will form “ Muscle memory ”, But we still need to discuss why .
convenient
Can run Jar It is a convenient way to package self-contained and runnable applications . such , We can minimize dependencies . Can pass Spring boot Maven and Gradle plugin To manage dependency .
Yunyuan is friendly
In the case of self provided containers (docker,k8s), jar
The package can be directly used as a single application
To manage .
In the past we used to use war
It's for multiple applications to share web server, Now is the world of containers , In a container , Generally, only one application process is run . Because there is only one process , We can easily manage it , For example, restart ( Will not affect other applications , Because there are no other applications ).
version control
utilize git
And other version control software , You can control everything you need to run the program ( Such as configuration files )
extensible
for example , Copy it to another server , then “ just run it!” No installation and / Or configure the container
Reference resources
https://medium.com/@satyajit.nalavade/make-jar-not-war-josh-long-d6ce5fbb8a23
边栏推荐
- Introduction to dead letter queue (two consumers, one producer)
- [quick start of Digital IC Verification] 7. Basic knowledge of digital circuits necessary for verification positions (including common interview questions)
- Is it safe for CICC fortune to open an account online?
- 全国爱眼教育大会,2022第四届北京国际青少年眼健康产业展会
- Unity编辑器扩展 UI控件篇
- 实操演示:产研团队如何高效构建需求工作流?
- 2020 CCPC Weihai - A. golden spirit (thinking), D. ABC project (big number decomposition / thinking)
- Rainbond 5.7.1 支持对接多家公有云和集群异常报警
- Schema和Model
- Guidelines for application of Shenzhen green and low carbon industry support plan in 2023
猜你喜欢
2022 Beijing eye health products exhibition, eye care products exhibition, China eye Expo held in November
2.8 basic knowledge of project management process
【愚公系列】2022年7月 Go教学课程 004-Go代码注释
Station B up builds the world's first pure red stone neural network, pornographic detection based on deep learning action recognition, Chen Tianqi's course progress of machine science compilation MLC,
Leetcode skimming: binary tree 17 (construct binary tree from middle order and post order traversal sequence)
信息学奥赛一本通 1339:【例3-4】求后序遍历 | 洛谷 P1827 [USACO3.4] 美国血统 American Heritage
Ros2 topic [01]: installing ros2 on win10
Wechat applet regular expression extraction link
CTF逆向基础
Oracle-表空间管理
随机推荐
14、Transformer--VIT TNT BETR
Leetcode(695)——岛屿的最大面积
【数字IC验证快速入门】7、验证岗位中必备的数字电路基础知识(含常见面试题)
ROS2专题【01】:win10上安装ROS2
2.8 basic knowledge of project management process
Some problems encountered in cocos2d-x project summary
Scala basics [HelloWorld code parsing, variables and identifiers]
物联网智能家居基本方法实现之经典
Sort and projection
无卷积骨干网络:金字塔Transformer,提升目标检测/分割等任务精度(附源代码)...
Solve the problem that the database configuration information under the ThinkPHP framework application directory is still connected by default after modification
Station B up builds the world's first pure red stone neural network, pornographic detection based on deep learning action recognition, Chen Tianqi's course progress of machine science compilation MLC,
Hong Kong stocks will welcome the "best ten yuan store". Can famous creative products break through through the IPO?
Classic implementation of the basic method of intelligent home of Internet of things
【愚公系列】2022年7月 Go教学课程 004-Go代码注释
. Net distributed transaction and landing solution
Leetcode skimming: binary tree 10 (number of nodes of a complete binary tree)
kubernetes资源对象介绍及常用命令(五)-(ConfigMap&Secret)
Rainbow 5.7.1 supports docking with multiple public clouds and clusters for abnormal alarms
Ffplay document [easy to understand]