Year: 2019

1. RestTemplate Introduction In today’s blog post we will have a look at Springs well-known rest client – the RestTemplate. The RestTemplate is the central class within the Spring framework for executing synchronous HTTP requests on the client side. Like Spring JdbcTemplate, RestTemplate is also a high-level API, which in turn is based on an […]Continue reading

In this post, I’ll explain how to work with resources in Spring using ResourceLoader. We’ll begin with a brief introduction about resources. Next, we’ll look at the Resource interface and some of its important methods. Finally, we’ll go through its implementations. Introduction: Working With Resources In Spring via ResourceLoader Frequently, we need to read external resources […]Continue reading

Spring Aware Interfaces allow you to hook into the inner workings of the Spring Framework. Though Spring Aware interfaces, you can access the Spring context, or Spring Bean life cycle events. Your Spring beans might require access to framework objects, such as ApplicationContext, BeanFactory, and ResourceLoader . To gain access, a bean can implement one […]Continue reading

In this article, we’ll to learn how to implement the service locator Design Pattern in Spring. We’ll begin with a brief introduction. Next, we’ll introduce an example that benefits from using the pattern. And finally, we’ll work through an implementation in Spring. Introduction: Service Locator Pattern When we begin working with the Spring framework, we run […]Continue reading

1. JdbcTemplate Introduction If we want to perform CRUD operations on a relational database the Spring ecosystem provides Spring Data JPA and Spring Support for JDBC. Spring Support for JDBC focuses on the JdbcTemplate class, which is internally based on the JDBC API of the Java SDK. Anyone who has ever worked with the JDBC […]Continue reading

Lists are common data structures in Java. Elements in a List have a specific order and can include duplicate elements. List have different implementations based on different use cases. The two key ones are ArrayList and LinkedList. Novice programmers often tend to use both the implementations interchangeably. However, both ArrayList and LinkedList have significant differences […]Continue reading

Timer is a utility class as a facility for Threads to schedule tasks for future execution as a background thread. You can use this class to schedule tasks for one-time execution or for repeated execution at a regular interval. In this post, I’ll explain how to schedule tasks in Java applications using the Timer and […]Continue reading