Delete Multiple Table Rows from Server using Angular 9

Introduction In this tutorial we will see how to delete multiple rows from HTML table as well as from database server at one go. We have seen tutorial how to display data from server to client side and how to select multiple rows on HTML table. We will put checkbox against each row on the table so that user will be able to select a particular row for deletion. We will also put a checkbox on the table header and selecting this checkbox all rows on the table will be…

Continue

Angular 9 Check/Uncheck Individual/All Checkbox on HTML Table Rows

Introduction Here we will create an example on how to check/uncheck individual/all checkbox on HTML table rows. We have seen how to display data from server using Angular and alternate row color using CSS. We will put checkbox against each row on the table so that user will be able to select a particular row. We will also put a checkbox on the table header and selecting this checkbox all rows on the table will be selected.

Continue

Display Data on HTML Table from Server using Angular 9 and Alternate Row Color

Introduction In this tutorial we are going to show you how to display data from server using Angular 9 and how to apply two different colors on alternate rows using css (cascading style sheet). We will use Spring Boot REST API to send data on client side and consume using client side technology Angular 9. We will use ngIf, else, ngFor directives to render data conditionally. We will show elseBlock if no record is found from the REST API. We will use index to determine odd or even column and…

Continue

How to map Custom Query Results into DTO in Spring Data JPA

In this tutorial we will see how to map custom query results into DTO in Spring Data JPA. Situations occur while you are unable to return the entity object(s) as results from your Spring Data JPA Repository and instead you are writing custom query or native query for your business requirements. So in such situations you need to convert result into DTO (data Trasfer Object). We will use @Query annotation to create custom queries in Spring Data JPA. It is also advisable to use DTO instead of entity class or…

Continue

Documenting REST APIs with OpenAPI 3

Introduction This tutorial will show you an example on how to document REST APIs using OpenAPI 3. When creating a REST API, good documentation is instrumental. Here we will use OpenAPI 3 in Spring application for creating documentation for REST APIs. We create and deploy REST services but we do not have an option to let others know in a single place, where REST services, having methods, request body, request params, etc., are exposed for consumption. Here we will take a look at SpringDoc — a tool that simplifies the…

Continue

REST over Https with Client certificate Authentication

Introduction The tutorial, REST over HTTPS with client certificate authentication, will show you how we can use client certificate to handshake with server along with basic authentication for consuming the service. Even you can use header authentication along with client certificate to make more secure. I will create Spring Boot application on Spring REST API and build the application using both maven and gradle build tools. I will show here both server side code and client side code using Spring Boot framework so that server expects client to establish communication…

Continue

Event Driven Streaming using Spring Cloud Stream and Apache Kafka

In this tutorial we will see an example of event driven streaming using Spring Cloud Stream and Apache Kafka streaming platform. How do we deal with some events, such as, a new user has registered to a portal, an order was placed, a file has been uploaded etc? Let’s say when an order was placed then we need a call to process payment, a call to reserve inventory, a call to begin the process of packaging, picking and shipping the product. For a few orders it’s not a big deal…

Continue

Spring Boot MVC and Hibernate CRUD Example

Introduction In this tutorial we will create an example on Spring Boot MVC and Hibernate CRUD. CRUD is an acronym that means Create, Read, Update and Delete operations. In my other tutorial I had also created Spring Boot MVC and JDBC CRUD Example. We will build the tutorial example using both maven and gradle build tools. We will create the annotation based hibernate configuration with Spring Boot framework. We are going to use MySQL database as a persistence storage for our application.

Continue

Spring Boot MVC and JDBC CRUD Example

Introduction In my other tutorial I had shown how to create an example on Spring MVC and JDBC CRUD example using annotations only, but here I am going to use Spring Boot framework. I did not update the other tutorial keeping in mind if someone still needs the example using Spring framework only. Here also I am going to show you the same example but using Spring Boot framework. We are going to use both gradle and maven build tools to build the application. We are going to see how…

Continue

How to create Datasource in Spring Boot application

In this tutorial we will see how to create Datasource in Spring Boot application in different ways. We need to create datasource in our applicationin order to interact with database and perform database operations in Spring or Spring Boot applications. You can use database vendor as per your project’s requirement but the underlying concept is same for creating the Datasource. If you are using Spring JDBC API then you can use this Datasource object to create JdbcTemplate object. This Datasource object is also useful for working with Spring Data JPA…

Continue