pom.xml is auto-generated when we create a maven project file. This is the project build and dependencies management file that contains information about the project version, plugins, and dependencies.

Use of pom.xml in Spring Boot

  • Dependencies and Jar Management
  • External Plugin Management.
  • It provides the configuration details of the project.
  • Manage the build or project versions

While we using a maven project, in that case, we do not need to download and add external jars one by one. Maven automatically downloads and adds the jar according to dependencies into pom.xml.

Required maven dependencies into spring boot Project

<dependency>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-starter-jdbc</artifactId>
  </dependency>
  <dependency>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-starter-data-jpa</artifactId>
  </dependency>

  <dependency>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-starter-web</artifactId>
  </dependency>

  <dependency>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-devtools</artifactId>
   <scope>runtime</scope>
   <optional>true</optional>
  </dependency>
  <dependency>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-starter-tomcat</artifactId>
   <scope>provided</scope>
  </dependency>
  <dependency>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-starter-test</artifactId>
   <scope>test</scope>
   <exclusions>
    <exclusion>
     <groupId>org.junit.vintage</groupId>
     <artifactId>junit-vintage-engine</artifactId>
    </exclusion>
   </exclusions>
  </dependency>
  
  <!-- https://mvnrepository.com/artifact/org.modelmapper/modelmapper -->
<dependency>
    <groupId>org.modelmapper</groupId>
    <artifactId>modelmapper</artifactId>
    <version>2.4.4</version>
</dependency>
  

  <dependency>
   <groupId>org.apache.tomcat.embed</groupId>
   <artifactId>tomcat-embed-jasper</artifactId>
   <scope>provided</scope>
  </dependency>

  <!-- https://mvnrepository.com/artifact/javax.persistence/persistence-api -->
  <dependency>
   <groupId>javax.persistence</groupId>
   <artifactId>persistence-api</artifactId>
   <version>1.0</version>
  </dependency>
  <dependency>
   <groupId>mysql</groupId>
   <artifactId>mysql-connector-java</artifactId>
   <scope>runtime</scope>
  </dependency>

  <dependency>
   <groupId>javax.servlet</groupId>
   <artifactId>servlet-api</artifactId>
   <version>2.5</version>
   <scope>provided</scope>
  </dependency>
  <dependency>
   <groupId>javax.servlet</groupId>
   <artifactId>jstl</artifactId>
  </dependency>

  <!-- Tiles API -->
  <!-- http://mvnrepository.com/artifact/org.apache.tiles/tiles-api -->
  <dependency>
   <groupId>org.apache.tiles</groupId>
   <artifactId>tiles-api</artifactId>
   <version>3.0.8</version>
  </dependency>


  <!-- Tiles Core -->
  <!-- http://mvnrepository.com/artifact/org.apache.tiles/tiles-core -->
  <dependency>
   <groupId>org.apache.tiles</groupId>
   <artifactId>tiles-core</artifactId>
   <version>3.0.8</version>
  </dependency>

  <!-- Tiles Servlet -->
  <!-- http://mvnrepository.com/artifact/org.apache.tiles/tiles-servlet -->
  <dependency>
   <groupId>org.apache.tiles</groupId>
   <artifactId>tiles-servlet</artifactId>
   <version>3.0.8</version>
  </dependency>

  <!-- Tiles JSP -->
  <!-- http://mvnrepository.com/artifact/org.apache.tiles/tiles-jsp -->
  <dependency>
   <groupId>org.apache.tiles</groupId>
   <artifactId>tiles-jsp</artifactId>
   <version>3.0.8</version>
  </dependency>

  <!-- https://mvnrepository.com/artifact/org.apache.tiles/tiles-request-api -->
  <dependency>
   <groupId>org.apache.tiles</groupId>
   <artifactId>tiles-request-api</artifactId>
   <version>1.0.6</version>
  </dependency>

  <!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-validator -->
  <dependency>
   <groupId>org.hibernate</groupId>
   <artifactId>hibernate-validator</artifactId>
   <version>6.1.3.Final</version>
  </dependency>

  <!-- https://mvnrepository.com/artifact/org.hibernate.validator/hibernate-validator-cdi -->
  <dependency>
   <groupId>org.hibernate.validator</groupId>
   <artifactId>hibernate-validator-cdi</artifactId>
   <version>6.1.3.Final</version>
  </dependency>

  <!-- https://mvnrepository.com/artifact/javax.validation/validation-api -->
  <dependency>
   <groupId>javax.validation</groupId>
   <artifactId>validation-api</artifactId>
   <version>2.0.1.Final</version>
  </dependency>

  <!-- https://mvnrepository.com/artifact/org.hibernate.validator/hibernate-validator-annotation-processor -->
  <dependency>
   <groupId>org.hibernate.validator</groupId>
   <artifactId>hibernate-validator-annotation-processor</artifactId>
   <version>6.1.3.Final</version>
  </dependency>


  <dependency>
   <groupId>javax.mail</groupId>
   <artifactId>mail</artifactId>
   <version>1.4.7</version>
  </dependency>

  <!-- https://mvnrepository.com/artifact/org.springframework/spring-core -->
  <!-- https://mvnrepository.com/artifact/javax.mail/javax.mail-api -->
  <dependency>
   <groupId>javax.mail</groupId>
   <artifactId>javax.mail-api</artifactId>
   <version>1.6.0-rc2</version>
  </dependency>
  
   <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <optional>true</optional>
    </dependency>



  <dependency>
   <groupId>com.sun.mail</groupId>
   <artifactId>javax.mail</artifactId>
   <version>1.5.3</version>
  </dependency>

  <dependency>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-starter-mail</artifactId>
   <version>2.2.5.RELEASE</version>
  </dependency>

  <dependency>
   <groupId>org.projectlombok</groupId>
   <artifactId>lombok</artifactId>
   <version>1.18.8</version>
   <scope>provided</scope>
  </dependency>

  <dependency>
   <groupId>commons-fileupload</groupId>
   <artifactId>commons-fileupload</artifactId>
   <version>1.3.1</version>
  </dependency>
  <dependency>
   <groupId>commons-io</groupId>
   <artifactId>commons-io</artifactId>
   <version>2.4</version>
  </dependency>

  <dependency>
   <groupId>org.apache.commons</groupId>
   <artifactId>commons-io</artifactId>
   <version>1.3.2</version>
  </dependency>