官术网_书友最值得收藏!

Skinny WAR

The approach of having a single JAR with all its needed dependencies may sound nice to begin with, but this approach may not work for everyone. Fat JARs are easy to deploy and run, but they do bring some complexities along with them:

  • Deployment size of the application JAR increases, as you would be bundling some parts of an application server within the deployment file
  • Deployment time increases, considering the file size and the need to upload it to different environments

The traditional Skinny WAR, when built against Java EE standards, can be measured in a few kilobytes (KB). Moving this around over the network is much simpler than doing the same with a Fat JAR, which bundles shared libraries along with the application code.

A more familiar style of working with web applications is to create a WAR file. This is your unit of deployment, which gets placed in a Java EE application server such as WildFly, Payara, or any other JEE compliant server. The WAR file contains only the application code, but the runtime environment is provided to it by means of a Java EE server. In a microservice architecture, the server would contain a single microservice, which is deployed in it as a WAR file.

This approach provides for a clean separation of the infrastructure code from the application code.

主站蜘蛛池模板: 闽清县| 五大连池市| 本溪| 苍溪县| 沛县| 阿鲁科尔沁旗| 莲花县| 古交市| 会泽县| 赣榆县| 咸阳市| 弋阳县| 彭州市| 连南| 平果县| 理塘县| 宁阳县| 都匀市| 武山县| 鸡西市| 荔浦县| 河曲县| 常山县| 桐柏县| 贺州市| 泉州市| 定南县| 武穴市| 梧州市| 蒙山县| 凌源市| 鹤岗市| 公主岭市| 德格县| 无为县| 蚌埠市| 吉林市| 台南市| 南充市| 呼和浩特市| 浮山县|