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

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.

主站蜘蛛池模板: 仁布县| 北辰区| 珲春市| 大余县| 油尖旺区| 崇左市| 股票| 宿迁市| 石棉县| 淮阳县| 聂拉木县| 阜平县| 隆化县| 邢台市| 腾冲县| 静海县| 格尔木市| 安图县| 锡林浩特市| 南丹县| 平原县| 确山县| 青冈县| 全椒县| 成武县| 长海县| 昌黎县| 黔江区| 象州县| 阳新县| 莎车县| 比如县| 邹平县| 温泉县| 高唐县| 通州区| 苗栗市| 云龙县| 双城市| 孝感市| 拉孜县|