Posts

Showing posts with the label MyBatis

Build REST CRUD APIs with Spring Boot and MyBatis

Image
Hello everyone, here we will learn how to develop REST-style CRUD APIs with Spring Boot, MyBatis, and H2 Database ( using annotations ). You can download the source code from our Github repository. Technologies used: Spring Boot 2.5.4 MyBatis 2.2.0 Java 11 Maven 3+ What is MyBatis?   MyBatis is a first-class persistence framework with support for custom SQL, stored procedures and advanced mappings. MyBatis eliminates almost all of the JDBC code and manual setting of parameters and retrieval of results. MyBatis can use simple XML or Annotations for configuration and map primitives, Map interfaces and Java POJOs (Plain Old Java Objects) to database records.  More Info... These are APIs that Spring Boot backend App will export: Project Directory: Maven dependencies [pom.xml] Puts mybatis-spring-boot-starter , h2 dependencies. <? xml version ="1.0" encoding ="UTF-8" ?> < project xmlns ="http://maven.apache.org/POM/4.0.0" xmlns: xsi ="htt