当前位置:网站首页>Make Jar, Not War
Make Jar, Not War
2022-07-07 01:21:00 【Small box technology sharing】
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
This paper is written by mdnice Multi platform Publishing
边栏推荐
- Pytorch中torch和torchvision的安装
- [JS] obtain the N days before and after the current time or the n months before and after the current time (hour, minute, second, year, month, day)
- Force buckle 1037 Effective boomerang
- 让我们,从头到尾,通透网络I/O模型
- Neon Optimization: summary of performance optimization experience
- 【信号与系统】
- Niuke cold training camp 6B (Freund has no green name level)
- 线段树(SegmentTree)
- Install Firefox browser on raspberry pie /arm device
- 【C语言进阶篇】指针的8道笔试题
猜你喜欢
Anfulai embedded weekly report no. 272: 2022.06.27--2022.07.03
Niuke cold training camp 6B (Freund has no green name level)
Js逆向——捅了【马蜂窝】的ob混淆与加速乐
Do you understand this patch of the interface control devaxpress WinForms skin editor?
Wood extraction in Halcon
HMM notes
身体质量指数程序,入门写死的小程序项目
Installation of gazebo & connection with ROS
[hfctf2020]babyupload session parsing engine
Dark horse notes - exception handling
随机推荐
BFS realizes breadth first traversal of adjacency matrix (with examples)
Make Jar, Not War
【js】获取当前时间的前后n天或前后n个月(时分秒年月日都可)
黑马笔记---异常处理
Dark horse notes - create immutable sets and streams
Niuke cold training camp 6B (Freund has no green name level)
UI控件Telerik UI for WinForms新主题——VS2022启发式主题
taro3.*中使用 dva 入门级别的哦
Docker method to install MySQL
HMM 笔记
There is an error in the paddehub application
In rails, when the resource creation operation fails and render: new is called, why must the URL be changed to the index URL of the resource?
The difference between spin and sleep
SuperSocket 1.6 创建一个简易的报文长度在头部的Socket服务器
NEON优化:矩阵转置的指令优化案例
域分析工具BloodHound的使用说明
Installation and testing of pyflink
Gazebo的安装&与ROS的连接
Wood extraction in Halcon
[Niuke] [noip2015] jumping stone