Posts

Build REST CRUD APIs with Kotlin, Spring Boot and MyBatis

Image
Hello everyone, today we will learn how to develop REST-style CRUD APIs with Spring Boot, Kotlin, MyBatis, and H2 Database.  You can download the source code from our Github repository. What is MyBatis? MyBatis is a 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. Some of the features of  MyBatis : In memory object filtering Fortifies clustering and simultaneous access by other applications without loss of transaction integrity Query Caching - Built-in support Fortifies disconnected operations Support for Remoting. Distributed Objects. Technologies used : Spring Boot 2.5.4 Spring  5.3.9 MyBatis  Kotlin Gradle After completing this tutorial what we will build?  We will build REST API  C

Vaadin + Spring Boot + JPA CRUD UI example

Image
Hello everyone, today we will learn how to develop a full-stack web application that is a basic  User Management Application  using Vaadin, Spring Boot, and JPA. Vaadin is the only framework that allows you to write UI 100% in Java without getting bogged down in JS, HTML, and CSS. If you prefer, you can also create layouts in HTML or with a visual designer. Vaadin apps run on the server and handle all communication automatically and securely. GitHub repository link is provided at the end of this tutorial. You can download the source code. Following technologies stack being used: Spring Boot 2.5.5 JDK 11 Vaadin 14.7.0 Maven 3 npm package manager H2DB After completing this tutorial what we will build? We will build a full-stack web application that is a basic User Management Application with CRUD features:     • Create User     • List User     • Update User     • Delete User     • View User Following is the User Interface of our application - Let's begin building the application, Pr

Micronaut REST Exception Handling - Global

Image
Hello everyone, today we will learn how to handle exceptions in the Micronaut REST application using ExceptionHandler . You can download the source code from our Github Repository. Project Directory: 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 http://maven.apache.org/xsd/maven-4.0.0.xsd" > <modelVersion> 4.0.0 </modelVersion> <groupId> com.knf.dev.demo </groupId> <artifactId> micronaut-global-exception-handling </artifactId> <version> 0.1 </version> <packaging> ${packaging} </packaging> <parent> <groupId> io.micronaut </groupId> <artifactId> micronaut-parent </artifactId> <version> 3.1.3 </version> </pa