External Configuration In Spring Boot Applications

External Configuration Spring Boot framework allows application developers to run the same Spring Boot application in different environments by making use of its feature of external configuration. The configuration in Spring Boot application uses environment variables, properties files, command-line arguments, YAML files, and system properties to mention the required configuration properties for its corresponding environments.

Contents Of Collection Are Updated But Never Queried

Problem You might have seen a warning message similar to Contents of collection are updated but never queried or more specifically Contents of collection ‘collection variable name’ are updated but never queried. So the collection variable may be any instance of an collection API, for example, List, Set, or even Map.

‘AutoCloseable’ used without ‘try’-with-resources statement

Problem The warning message ‘AutoCloseable’ used without ‘try’-with-resources statement may appear in your Junit class(es) when you might have the similar kind of line (MockitoAnnotations.initMocks(this); is replaced in Mockito 3 by MockitoAnnotations.openMocks(this);) as shown below in your Junit class: Junit 5 Or

Store Image As Blob And Retrieve Blob As Image Using Spring

Image As Blob And Blob As Image Here in this example I am going to show you how to store image as blob into database. While retrieving blob from database I am going to display blob as image. While storing image as blob into database I am going to display a page which will be used for uploading the image….

React Login Logout With Spring Boot Security

React Spring Security Here in this example I am going to integrate React JS front-end with Spring Boot Security framework. When user will try to access the home page the user will be redirected to the login page if the user has not been authenticated already. Spring Boot’s default security mechanism asks for username and password when a user tries…

Spring Cloud LoadBalancer With Microservices

Microservices And Load Balancer Microservice, also known as, microservice architecture is an architectural style with an approach for developing a single application as a suite of small services, each running in its own process and communicating with a lightweight resource API that has the following characteristics:

Google Organization Chart Using Spring

Organization Chart Here I am going to build google organization chart using spring boot framework. Organization chart can be used to display hierarchical data of an organization, for example, you can display the employees and their managers in hierarchical order. You can also find the organization hierarchy in your organization also. For example, you can see your manager, your manager’s…

Completable Future To Fetch Data Asynchronously

Asynchronous Data Here I am going to show you how to fetch data asynchronously. So, data which are not coordinated in time will be fetched any time. This means that data is sent at irregular intervals, without any specific time or synchronization between the sender and receiver. In this example I am going to use CompletableFuture from Java 8’s new…

Spring Boot Hikari Connection Pool Configurations

Hikari Connection Pool Here in this Spring Boot application example, I am going to show you how to use Hikari connection pool to use dedicated HikariDataSource instead of the use of database specific datasource. Hikari connection pool commonly known as HikariCP is extremely fast, light-weight, simple and production ready JDBC connection pool.

Spring Batch 5 Migration

Spring Batch I have already written some posts on Spring Batch. I am going to show you here what are the changes required while you are migrating your existing spring batch application to spring batch version 5.x or while you are using spring batch in spring boot 3.x. Requirements For Spring Batch 5 Implementation Related Changes Here are some changes…