9 - Spring-Boot 2

Download as pdf or txt
Download as pdf or txt
You are on page 1of 20

 You can Develop as WAR file with Spring Boot

 WAR file is deployable application which can be deployed in any External Container to
run.

How to deploy War file to Tomcat8


1) Make Sure that JDK8 is Installed.

E:\JDK1.8.0
E:\JDK1.8.0\bin
E:\JDK1.8.0\lib

2) Set JAVA_HOME

set JAVA_HOME=E:\JDK1.8.0

3) Make Sure that Tomcat8.5 is Installed.

E:\Tomcat8.5
E:\Tomcat8.5\bin\tomcat8
E:\Tomcat8.5\lib\*.jar
E:\Tomcat8.5\conf\server.xml
E:\Tomcat8.5\conf\web.xml
E:\Tomcat8.5\conf\tomcat-users.xml *

Consider Tomcat port : 5050

4) Make sure that Maven is Installed.

E:\apache-maven-3.6.3
E:\apache-maven-3.6.3\bin\mvn
E:\apache-maven-3.6.3\lib\*.jar
E:\apache-maven-3.6.3\confg\settings.xml

5) Set Maven Path

set path=%path%; E:\apache-maven-3.6.3\bin;

6) Add an user with roles manager-gui and manager-script in tomcat-users.xml

<user username="SomPrakash"
password="SomPrakash"
roles="manager-gui,manager-script" />

www.jtcindia.org 108 Spring Boot 2


7) Add above Tomcat’s user in the Maven setting file, later Maven will use this user to
login Tomcat server.

<server>
<id>jtcTomcatServer</id>
<username>SomPrakash</username>
<password>SomPrakash</password>
</server>

8) Add Tomcat7 Maven Plugin in pom.xml

<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<url>http://localhost:5050/manager/text</url>
<server>jtcTomcatServer</server>
<path>/MyLab18</path>
</configuration>
</plugin>

Lab18: Spring MVC with Boot (WAR)


Working Steps:
1) Copy Lab16 as Lab18.

2) Update application.properties

No Properies Required

3) Update pom.xml (As Given in Lab18)


A) Add following 6 Dependencies
spring-boot-starter-web
jstl
standard
bootstrap
jquery
spring-boot-devtools

B) Add following 2 Plug-Ins


maven-compiler-plugin
tomcat7-maven-plugin

www.jtcindia.org 109 Spring Boot 2


4) Open Command Line and Start the Tomcat8.5
E:\Tomcat8.5\bin>tomcat8
5) Open Another Command Line and run the Maven Command
....\Lab18>mvn clean compile package tomcat7:deploy
6) Open Browser and type http://localhost:5050/MyLab18
Note : Maven Useful Commands
Deploy command => mvn tomcat7:deploy
UnDeploy command => mvn tomcat7:undeploy
ReDeploy command => mvn tomcat7:redeploy
Lab18: Files Required

1. index.jsp Same as Lab16


2. booksList.jsp Same as Lab16
3. Book.java Same as Lab16
4. IndexController.java Same as Lab16
5. BooksController.java Same as Lab16
6. JTCWebConfig.java Same as Lab16
7. StartMyBootApp.java Same as Lab16
8. application.properties Updated in Lab18
9. pom.xml Updated in Lab18

www.jtcindia.org 110 Spring Boot 2


8. application.properties
No Properies

9. pom.xml
<project…>
<modelVersion>4.0.0</modelVersion>
<groupId>com.jtcindia.springboot</groupId>
<artifactId>Lab18</artifactId>
<version>1.0</version>
<packaging>war</packaging>
<name>Lab18-jar</name>
<url>https://www.jtcindia.org</url>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.2.RELEASE</version>
</parent>

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

<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>

<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
</dependency>

<dependency>
<groupId>org.webjars</groupId>
<artifactId>bootstrap</artifactId>
<version>4.3.1</version>
</dependency>

<dependency>

www.jtcindia.org 111 Spring Boot 2


<groupId>org.webjars</groupId>
<artifactId>jquery</artifactId>
<version>3.4.1</version>
</dependency>

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

</dependencies>
<build>
<finalName>MyLab18</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<url>http://localhost:5050/manager/text</url>
<server>jtcTomcatServer</server>
<path>/MyLab18</path>
<update>true</update>
</configuration>
</plugin>
</plugins>

</build>
</project>

www.jtcindia.org 112 Spring Boot 2


Lab19: Files required
1. index.jsp 2. booksList.jsp
3. viewBook.jsp 4. addEditBook.jsp
5. IndexController.java 6. BookController.java
7. BookService.java 8. BookServiceImpl.java
9. BookDAO.java 10. BookDAOImpl.java
11. Book.java 12. JTCWebConfig.java
13. MyBootWebApplication.java 14. application.properties
15. pom.xml

viewBook.jsp

1. index.jsp
<html>
<head>
<title>JTC Bookstore</title>
<link href="webjars/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="card-header">
<h2 class="text-center">Welcome to JTC Bookstore</h2>
<h4 class="text-center"> Best Books and Best Videos</h4>
</div>
<br/><br/>
<div class="container" align="center">
<h2> <a href="showAllBooks">Display All Books</a> </h2>
</div>
</body>
</html>

www.jtcindia.org 113 Spring Boot 2


2. bookList.jsp
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<html>
<head>
<title>JTC Bookstore</title>
<link href="webjars/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="card-header">
<h2 class="text-center">Welcome to JTC Bookstore</h2>
<h4 class="text-center"> Best Books and Best Videos</h4>
</div>
<br/><br/>
<div class="container" >
<table class="table table-striped table-bordered" style="font-size:20px;font-weight:bold;">
<tr>
<th>Book ID</th>
<th>Book Name</th>
<th>Author</th>
<th>Price</th>
<th>Category</th>
<th>Publications </th>
<th colspan="2" align="center">
<form:form action="addEditBookForm">
<input type="hidden" name="bookId" value="0"/>
<input type="submit" value=" Add New Book " class="btn btn-success btn-lg"/>
</form:form> </th>
</tr>
<c:forEach var="mybook" items="${MyBooksList}">
<tr>
<td> <a href="viewBook?bookId=${mybook.bid }"> ${mybook.bid } </a> </td>
<td>${mybook.bname }</td>
<td>${mybook.author }</td>
<td>${mybook.price }</td>
<td>${mybook.category }</td>
<td>${mybook.pub }</td>
<td>
<form:form action="addEditBookForm">
<input type="hidden" name="bookId" value="${mybook.bid }"/>
<input type="submit" value=" Edit " class="btn btn-primary btn-lg"/>
</form:form>
</td>

www.jtcindia.org 114 Spring Boot 2


<td>
<form:form action="deleteBook">
<input type="hidden" name="bookId" value="${mybook.bid }"/>
<input type="submit" value=" Delete " class="btn btn-danger btn-lg"/>
</form:form>
</td>
</tr>
</c:forEach>
</table>
</div>
</body>
</html>

3. viewBook.jsp
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<html> <head>
<title>JTC Bookstore</title>
<link href="webjars/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="card-header">
<h2 class="text-center">Welcome to JTC Bookstore</h2>
<h4 class="text-center"> Best Books and Best Videos</h4>
</div>
<br/><br/>
<div class="container" >
<table class="table table-striped table-bordered" style="font-size:20px;font-weight:bold;">
<tr>
<td align="center" colspan="3"> Book Details</td>
</tr>
<tr>
<td> Book Id</td>
<td> ${MyBook.bid} </td>
</tr>
<tr>
<td> Book Name</td>
<td> ${MyBook.bname} </td>
</tr>
<tr>
<td>Author</td>
<td> ${MyBook.author} </td>
</tr>

www.jtcindia.org 115 Spring Boot 2


<tr>
<td>Price</td>
<td>${MyBook.price} </td>
</tr>
<tr>
<td>Category</td>
<td>${MyBook.category} </td>
</tr>
<tr>
<td>Publications</td>
<td>${MyBook.pub} </td>
</tr>
</table> </div>
<div align="center">
<h2> <a href="showAllBooks">Goto Book Home</a> </h2>
</div>
</body> </html>

4. addEditBook.jsp
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<html>
<head>
<title>JTC Bookstore</title>
<link href="webjars/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="card-header">
<h2 class="text-center">Welcome to JTC Bookstore</h2>
<h4 class="text-center"> Best Books and Best Videos</h4>
</div>
<br/><br/>
<div align="center" class="container">
<form:form action="saveUpdateBook" method="post" modelAttribute="mybook">
<table class="table" style="font-size:20px;font-weight:bold;">
<tr>

<c:if test="${OpType eq 'ADD' }">


<td align="center" colspan="3"> <h2> Add New Book </h2></td>
</c:if>
<c:if test="${OpType eq 'UPDATE' }">
<td align="center" colspan="3"> <h2> Update Book </h2></td>
</c:if>

www.jtcindia.org 116 Spring Boot 2


</tr>
<tr>
<td> Book Name</td>
<td><form:input path="bname" class="form-control form-control-lg"/></td>
<td><font color=red size=4><form:errors path="bname" /></font></td>
</tr>
<tr>
<td>Author</td>
<td><form:input path="author" class="form-control form-control-lg"/></td>
<td><font color=red size=4><form:errors path="author" /></font></td>
</tr>
<tr>
<td>Price</td>
<td><form:input path="price" class="form-control form-control-lg"/></td>
<td><font color=red size=4><form:errors path="price" /></font></td>
</tr>
<tr>
<td>Category</td>
<td><form:input path="category" class="form-control form-control-lg"/></td>
<td><font color=red size=4><form:errors path="category" /></font></td>
</tr>
<tr>
<td>Publications</td>
<td><form:input path="pub" class="form-control form-control-lg"/></td>
<td><font color=red size=4><form:errors path="pub" /></font></td>
</tr>
<tr>
<td align="center" colspan="3">
<input type="hidden" name="OpType" value="${OpType}"/>
<c:if test="${OpType eq 'ADD' }">
<input type="submit" value="Add New Book" class="btn btn-primary btn-lg"/>
</c:if>
<c:if test="${OpType eq 'UPDATE' }">
<input type="submit" value="Update Book" class="btn btn-primary btn-lg"/>
<form:hidden path="bid" />
</c:if>
</td>
</tr>
</table>
</form:form>
</div>
</body>
</html>

www.jtcindia.org 117 Spring Boot 2


5. IndexController.java
package com.jtcindia.spring.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
/*
* @Author : Som Prakash Rai
* @Company : Jtcindia
* @Website : www.jtcindia.org
* */
@Controller
public class IndexController {

@GetMapping("/")
public String showIndexPage() {
System.out.println("---------showIndexPage----------");
return "index";
}

6. BookController.java
package com.jtcindia.spring.controller;

import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.SessionAttributes;
import com.jtcindia.spring.entity.Book;
import com.jtcindia.spring.service.BookService;
/*
* @Author : Som Prakash Rai
* @Company : JTCINDIA
* @Website : www.jtcindia.org
* */
@Controller
@SessionAttributes("MyBooksList")
public class BookController {

www.jtcindia.org 118 Spring Boot 2


@Autowired
BookService bookService;

@GetMapping("/showAllBooks")
public String showBooksList(Model model) {
System.out.println("-------BookController--showBooksList()---------- ");
List<Book> blist=bookService.getAllBooks();
model.addAttribute("MyBooksList", blist);

return "booksList";
}

@PostMapping("/addEditBookForm")
public String addBookForm(@RequestParam("bookId") Integer bookId,Model model)
{ System.out.println("-------BookController--addEditBookForm()-------- ");
System.out.println(bookId);
Book book=new Book();
String opType="ADD";
if(bookId!=0) {
book=bookService.getBookById(bookId);
opType="UPDATE";
}
model.addAttribute("mybook", book);
model.addAttribute("OpType", opType);

return "addEditBook";
}

@PostMapping("/saveUpdateBook")
public String saveUpdateBook(@Valid @ModelAttribute("mybook") Book
book,BindingResult result,Model model,HttpServletRequest req) {
System.out.println("-------BookController--saveUpdateBook()---------- ");
String opType=req.getParameter("OpType");
System.out.println(opType); if(opType.equals("ADD"))
{
bookService.addBook(book);
}
if(opType.equals("UPDATE"))
{ bookService.updateBook(book);
}

List<Book> blist=bookService.getAllBooks();
model.addAttribute("MyBooksList", blist);

return "booksList";
}

www.jtcindia.org 119 Spring Boot 2


@PostMapping("/deleteBook")
public String deleteBook(@RequestParam("bookId") Integer bookId,Model model)
{ System.out.println("-------BookController--deleteBook()-------- ");
bookService.deleteBook(bookId);
List<Book> blist=bookService.getAllBooks();
model.addAttribute("MyBooksList", blist);

return "booksList";
}

@GetMapping("/viewBook")
public String viewBook(@RequestParam("bookId") String bookId,Model model)
{ System.out.println("-------BookController--viewBook()-------- ");
System.out.println(bookId);
Book book=bookService.getBookById(Integer.parseInt(bookId));
model.addAttribute("MyBook", book);

return "viewBook";
}

7. BookService.java
package com.jtcindia.spring.service;

import java.util.List;
import com.jtcindia.spring.entity.Book;
/*
* @Author : Som Prakash Rai
* @Company : JTCINDIA
* @Website : www.jtcindia.org
* */
public interface BookService {
public List<Book> getAllBooks();
public Book getBookById(Integer bid);
public void addBook(Book book);
public void updateBook(Book book);
public void deleteBook(Integer bid);
}

8. BookServiceImpl.java
package com.jtcindia.spring.serviceimpl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.jtcindia.spring.dao.BookDAO;

www.jtcindia.org 120 Spring Boot 2


import com.jtcindia.spring.entity.Book;
import com.jtcindia.spring.service.BookService;
/*
* @Author : Som Prakash Rai
* @Company : Jtcindia
* @Website : www.jtcindia.org
* */
@Service
public class BookServiceImpl implements BookService{

@Autowired
BookDAO bookDAO;

@Override
public List<Book> getAllBooks() {
System.out.println("-----BookServiceImpl--getAllBooks()---------- ");
return bookDAO.getAllBooks();
}
@Override
public Book getBookById(Integer bid) {
System.out.println("-----BookServiceImpl--getBookById()---------- ");
return bookDAO.getBookById(bid);
}
@Override
public void addBook(Book book) {
System.out.println("-----BookServiceImpl--addBook()---------- ");
bookDAO.addBook(book);
}

@Override
public void updateBook(Book book) {
System.out.println("-----BookServiceImpl--updateBook()---------- ");
bookDAO.updateBook(book);
}

@Override
public void deleteBook(Integer bid) {
System.out.println("-----BookServiceImpl--deleteBook()---------- ");
bookDAO.deleteBook(bid);
}
}

www.jtcindia.org 121 Spring Boot 2


9. BookDAO.java
package com.jtcindia.spring.dao;

import java.util.List;
import com.jtcindia.spring.entity.Book;
/*
* @Author : Som Prakash Rai
* @Company : Jtcindia
* @Website : www.jtcindia.org
* */
public interface BookDAO{
public List<Book> getAllBooks();
public Book getBookById(Integer bid);
public void addBook(Book book);
public void updateBook(Book book);
public void deleteBook(Integer bid);
}

10. BookDAOImpl.java
package com.jtcindia.spring.daoimpl;

import java.util.List;
import javax.persistence.EntityManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
import com.jtcindia.spring.dao.BookDAO;
import com.jtcindia.spring.entity.Book;
/*
* @Author : Som Prakash Rai
* @Company : Jtcindia
* @Website : www.jtcindia.org
* */
@Repository
@Transactional
public class BookDAOImpl implements BookDAO{

@Autowired
EntityManager entityManager;

public List<Book> getAllBooks(){


System.out.println("-----BookDAOImpl--getAllBooks()---------- ");
String jpaql = "from Book book";
List<Book> list=entityManager.createQuery(jpaql) .getResultList();
return list;
}

www.jtcindia.org 122 Spring Boot 2


public Book getBookById(Integer bid) {
System.out.println("-----BookDAOImpl--getBookById()---------- ");
return entityManager.getReference(Book.class,bid);
}
public void addBook(Book book) {
System.out.println("-----BookDAOImpl--addBook()----------");
entityManager.persist(book);
}
public void deleteBook(Integer bid) {
System.out.println("-----BookDAOImpl--deleteBook()----------");
Book book=entityManager.getReference(Book.class,bid);
entityManager.remove(book);
}

public void updateBook(Book book) {


System.out.println("-----BookDAOImpl--updateBook()---------- ");
entityManager.merge(book);
}
}

11. Book.java
package com.jtcindia.spring.entity;

import java.math.BigDecimal;
import javax.persistence.*;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
/*
* @Author : Som Prakash Rai
* @Company : Jtcindia
* @Website : www.jtcindia.org
* */
@Entity
@Table(name="mybooks")
public class Book {
@Id
@Column(name="bid")
@GeneratedValue(strategy = GenerationType.AUTO)
private Integer bid;

@Column(name="bname")
@NotEmpty(message = "Book Name is Required")
@Size(min=5,max=20,message="Name length must be between 5 and 20")
private String bname;

www.jtcindia.org 123 Spring Boot 2


@Column(name="author")
@NotEmpty(message = "Author is Required")
@Size(min=3,max=10,message="Name length must be between 3 and 10")
private String author;

@Column(name="price")
@NotNull(message = "Price is Required")
@Min(value=500, message="Price must be min : 500")
@Max(value=1500, message="Price must be max : 1500")
private BigDecimal price;

@Column(name="category")
@NotEmpty(message = "Category is Required")
private String category;

@Column(name="pub")
@NotEmpty(message = "Pub is Required")
private String pub;

public Book() {
}
//Constructors
//Setters and Getters

@Override
public String
toString() {
return "[" + bid + " , " + bname + " , " + author + " , " + price + " , " + category + " , " + pub+ "]";
}
}
12. JTCWebConfig.java
package com.jtcindia.spring.config;

import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.view.*;
/*
* @Author : Som Prakash Rai
* @Company : Jtcindia
* @Website : www.jtcindia.org
* */

www.jtcindia.org 124 Spring Boot 2


@EnableWebMvc
@Configuration
@EnableTransactionManagement
@ComponentScan({ "com.jtcindia.spring" })
@EntityScan(basePackages = { "com.jtcindia.spring.entity" })
public class JTCWebConfig implements
WebMvcConfigurer{ @Bean
public InternalResourceViewResolver viewResolver()
{ InternalResourceViewResolver viewResolver = new
InternalResourceViewResolver(); viewResolver.setViewClass(JstlView.class);
viewResolver.setPrefix("/WEB-INF/myjsps/");
viewResolver.setSuffix(".jsp");
return viewResolver;
}

@Override
public void addResourceHandlers(ResourceHandlerRegistry registry)
{ registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-
INF/resources/webjars/");
}
}

13. StartMyBootApp.java
package com.jtcindia.spring.config;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
/*
* @Author : Som Prakash Rai
* @Company : Jtcindia
* @Website : www.jtcindia.org
* */
@SpringBootApplication(scanBasePackages = {"com.jtcindia.spring"}) @EnableWebMvc
public class StartMyBootApp extends
SpringBootServletInitializer{ public static void
main(String[] args) {
SpringApplication.run(StartMyBootApp.class, args);
}
}

14. application.properties
server.port=5599

logging.level.root=INFO
logging.pattern.console=%-5level %logger{36} - %msg%n

www.jtcindia.org 125 Spring Boot 2


spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/bookstoredb
spring.datasource.username=root
spring.datasource.password=SomPrakash

spring.datasource.hikari.connectionTimeout=20000
spring.datasource.hikari.maximumPoolSize=5

spring.jpa.show-sql=true
spring.jpa.hibernate.ddl-auto=update

15. pom.xml
<project ….>
<modelVersion>4.0.0</modelVersion>
<groupId>com.jtcindia.springboot</groupId>
<artifactId>Lab19</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<name>Lab19-jar</name>
<url>https://www.jtcindia.org</url>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.2.RELEASE</version>
</parent>

<dependencies>

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

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

<dependency>
<groupId>org.webjars</groupId>
<artifactId>bootstrap</artifactId>
<version>4.3.1</version>
</dependency>

<dependency>
<groupId>org.webjars</groupId>
<artifactId>jquery</artifactId>

www.jtcindia.org 126 Spring Boot 2


<version>3.4.1</version>
</dependency>

<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>

<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
</dependency>

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

<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.6</version>
</dependency>

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

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency>
</dependencies>

<build>
<finalName>MyLab19</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

www.jtcindia.org 127 Spring Boot 2

You might also like