Posts

Showing posts with the label crud

Spring Boot + Mustache Template + Spring Data JPA CRUD example

Image
Hello everyone, In this post we will learn how to develop a CRUD web application, using Spring Boot, Mustache template, H2DB, and Spring Data JPA. Technologies Used: Java 17 Spring Boot 2.7.0 Maven 3+ Mustache H2 Database Bootstrap Project Structure: Dependency Management - Maven[Pom.xml] <? xml version ="1.0" encoding ="UTF-8" ?> < project xmlns ="http://maven.apache.org/POM/4.0.0" xmlns: xsi ="http://www.w3.org/2001/XMLSchema-instance" xsi :schemaLocation ="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" > < modelVersion >4.0.0</ modelVersion > < parent > < groupId >org.springframework.boot</ groupId > < artifactId >spring-boot-starter-parent</ artifactId > < version >2.7.0</ version > < relativePath /> <!-- lookup parent from repository --> </ parent > < groupId >co

Build REST CRUD APIs with Spring Boot and MYSQL

Image
Hello everyone, In this article, we will learn how to develop a  REST-style web service with Spring Boot, Spring Data JPA, and MYSQL.The  GitHub repository link is provided at the end of this tutorial. You could download the source code. Technologies used :  Spring Boot 2.6.3 Spring  Data JPA 2.6.3 Java 11 MYSQL connector  MYSQL Server Maven 3+  These are APIs that Spring backend App will export:   Final Project Directory Create database 'userdb' CREATE DATABASE userdb; Maven[pom.xml]   A Project Object Model or POM is the fundamental unit of work in Maven. It is an XML file that contains information about the project and configuration details utilized by Maven to build the project. It contains default values for most projects.  <?xml version = "1.0" encoding = "UTF-8" ?> <project xmlns = "http://maven.apache.org/POM/4.0.0" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation = "http://maven.apa