Java, Software Development

Spring Boot – Access Spring ApplicationContext in JUnit Tests

This post shows how to access the Spring ApplicationContext object in JUnit tests. Now, why would we want to do that? Well, sometimes, we need to work directly with the

Read More...

Software Development, Spring, Spring Boot

Retry Operation at specific Exception using Spring Retry

Spring-Retry allows us to retry operations when the codes encounter exceptions. How do we limit the retries to specific exceptions only? For instance, we wouldn’t want to retry SOAP Web

Read More...

Java, Software Development, Spring

Spring Boot Asynchronous Controller Without External Queues

This post shows how to create an asynchronous web controller or endpoint in Spring Boot (or Spring in general). The codes won’t use external queues of any kind. However, they’ll

Read More...

Java, Software Development, Spring

Spring Dependency Injection Examples Without Spring Boot

The Spring Framework has come a long way. Nowadays, it is way easier to start a Java project with the Spring Framework using Spring Boot. In the past, we used

Read More...

Software Development

Using Spring Retry API

Did a method just throw an Exception? Well, we could re-invoke it a few times more before giving up using Spring’s Retry API. Last time we touched on BackOff and related interfaces and classes which is used in this API.

Read More...

Software Development

More Elegant way to Retry Operations in Java using Spring

This post talks about a better way to retry failed operations in Java using classes in Spring.

Read More...

Java, Software Development, Spring

Trim String Values From Properties Files in Spring Boot

This post demonstrates how to trim string values from .properties files using SpringApplicationBuilder and a subclass of or anonymous class of StandardEnvironment supplied to the builder with overridden getProperty(String) and getProperty(String, String) methods.

Read More...

Java, Software Development, Spring

Validate Properties Files At Startup in Spring Boot

A .properties file contains lines of string pair. Each string pair consists of a parameter name (called the key), and parameter value. This post is about how to validate the parameter value at the application startup.

Read More...

Software Development

Autowire beans to a List in Spring using Java

This post is about how to auto-wire a set of beans to a list in Spring. Essentially, we need to add @bean’s to an list.

Read More...

Software Development

Create a Kotlin-based Spring Boot project using IntelliJ IDEA

This post demonstrates how to create a Kotlin-based Spring Boot project using IntelliJ IDEA. It also creates a simple command-line application that leverages Spring’s Dependency Injection.

Read More...