Wednesday, October 21, 2020

Spring Boot Packaging

 

Spring Boot Packaging

In the J2EE application, modules are packed as JAR, WAR, and EAR. It is the compressed file formats that is used in the J2EE. J2EE defines three types of archives:

  • WAR
  • JAR
  • EAR

 

EAR > WAR > JAR

WAR

WAR stands for Web Archive.  WAR file represents the web application. Web module contains servlet classes, JSP files, HTML files, JavaScripts, etc. are packaged as a JAR file with .war extension. It contains a special directory called WEB-INF.

WAR file = JAR file + WEB-INF

 JAR

 JAR stands for Java Archive. An EJB (Enterprise Java Beans) module that contains bean files (class files), a manifest, and EJB deployment descriptor (XML file) are packaged as JAR files with the extension .jar. It is used by software developers to distribute Java classes and various metadata.

 JAR file = Java classes + manifest + descriptor.

EAR

EAR stands for Enterprise Archive. EAR file represents the enterprise application. The above two files are packaged as a JAR file with the .ear extension. It is deployed into the Application Server.It is a special JAR that contains an application.xml file in the META-INF folder.

EAR file = multiple JAR's and WAR's

 

No comments:

Post a Comment