Category: Spring

Enterprise Spring applications typically need to run in multiple environments. For example, development, testing, staging, and production. Each such environment has its own set of settings. For example, you might be using an embedded H2 database for development but an enterprise-grade Oracle or MySQL database for production. So the data source and connection configurations for […]Continue reading

Using inheritance can be a valuable time saver for your Spring Framework configurations. In Spring, a bean definition is the configuration information that we provide for beans. For example, bean definition can include property values and constructor arguments of the bean. Bean definition can also include container-specific information, such as init and destroy method settings, […]Continue reading

As of writing this post, Spring Boot 2.2 was released on October 16th, 2019. This new release is built on Spring Framework 5.2. The Spring Boot 2.2 has a number of great features, which we’ll explore in this post. Spring Framework and Java Spring Framework 5.2 Spring Boot 2.2 uses Spring Framework 5.2. A crucial […]Continue reading

1. Introduction In today’s blog post we will look at how we can use the caching provider Ehcache in Spring Boot. Ehcache is an open source library implemented in Java for implementing caches in Java programs, especially local and distributed caches in main memory or on the hard disk. Thanks to the implementation of JSR-107, […]Continue reading

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