Showing posts with the label crud

Spring Boot + Mustache Template + Spring Data JPA CRUD example

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 ="" xmlns: xsi ="" xsi :schemaLocation ="" > < 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

Hello everyone, In this article, we will learn how to develop a  REST-style web service with Spring Boot, Spring Data JPA, and MYSQL. GitHub repository link is provided at the end of this tutorial. You can 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:   GET all User's        :     /api/v1/users            : get  GET User by ID     :     /api/v1/users/{id}    : get CREATE User        :     /api/v1/users            : post UPDATE User        :     /api/v1/users/{id}    : put DELETE User        :     /api/v1/users/{id}    : delete  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