Spring Asynchronous Request Processing via DeferredResult Class

Asynchronous via DeferredResult I am going to discuss here how to perform asynchronous request processing via Spring’s DeferredResult class. A DeferredResult can be used when the application wants to produce the return value from a thread of its own choice. A DeferredResult is what is possibly not-yet-finished computation that will be available in future. Spring MVC 3.2 introduced a Servlet…

Spring Centralized Runtime Properties Configuration without refreshing the Client

Introduction This tutorial walks you through the process of consuming the configurations from the Spring cloud config server. So I will setup a config server and build a client application consumes the configuration on startup and then refreshes the configuration without restarting the client. Let’s say you have some configuration values, in application properties or yaml/yml files, which may be…

Spring bean life cycle call back Methods Example

Spring framework provides bean life cycle call back methods to perform some additional tasks which you may want to perform when a bean is initiated or created or when a bean is about to get destroyed. Therefore you can run a method which will do some initialization process during bean initialization and you can run another method which will do…

InitializingBean and DisposableBean in Spring

Spring InitializingBean and DisposableBean are the interfaces used in life cycle of Spring beans management. Each of these interfaces has only one method. InitializingBean has a method called afterPropertiesSet() and DisposableBean has a method called destroy(). Spring container runs the method afterPropertiesSet() once the bean properties have been set and Spring container runs destroy() method once Spring container releases the…

Custom init() and destroy() methods in Spring

Introduction In this tutorial we will discuss on Spring custom init() and destroy() methods. These methods are call back methods which used in Spring life cycle. You can use these methods to to some initialization and clean up jobs just after the bean is created by the Spring container or just before the bean is about to be destroyed by…

BeanPostProcessor in Spring

BeanPostProcessor in Spring is used for extending the functionality of framework if want to do any configuration Pre- and Post- bean initialization done by spring container. By default, Spring will not aware of the @PostConstruct and @PreDestroy annotation. To enable it, you have to either register CommonAnnotationBeanPostProcessor or specify <context:annotation-config/> in the bean configuration file. Here CommonAnnotationBeanPostProcessor is predefined BeanPostProcessor…

GraphQL Spring MySQL CRUD Example

Introduction The tutorial, GraphQL Spring MySQL CRUD example will show you how to build CRUD (Create, Read, Update, Delete) operations using GraphQL with Spring Boot framework. We will use MySQL database server for storing data and Spring Data JPA to perform database activities. My previous tutorials on GraphQL explained about how to wrap REST APIs instead of converting them into…

Delete Multiple Table Rows From Server Using Angular

Introduction In this tutorial, I will show you how to delete multiple rows from HTML table as well as from database server at one go. You might have seen tutorial how to display data from server to client side and how to select multiple rows on HTML table. I will put checkbox against each row on the table so that…

Angular Check/Uncheck Individual/All Checkbox On HTML Table Rows

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

Display Data On HTML Table From Server Using Angular And Alternate Row Color

Introduction In this tutorial I am 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). I will use Spring Boot REST API to send data on client side and consume using client side technology Angular 9. I will use ngIf, else,…