Learn how to dynamically register beans based on custom properties.
Also find me here:
Baeldung Author
Abhinav Pandey
Senior Java Developer. Certified Azure Developer. Builds microservices for a living using Spring Boot and distributed architecture components like Redis, SQL, Kafka, and RabbitMQ.
Here's what I've written (so far):
Baeldung on Java
- All
- Testing (4)
- Spring Data (4)
- Spring Boot (3)
- Spring (3)
- REST (2)
- Jackson (2)
- XML (1)
- Web Services (1)
- Spring Web (1)
- Spring Security (1)
- Spring MVC (1)
- Spring Cloud (1)
- Reactive (1)
- NoSQL (1)
- Networking (1)
- Logging (1)
- Java Dates (1)
- Java Concurrency (1)
- Java (1)
- JSON (1)
- JPA (1)
Creating Reactive APIs With Micronaut and MongoDB
Filed under Reactive, Web Services
Learn how to create reactive REST APIs with Micronaut and MongoDB.
Reading JSON Documents as Maps and Comparing Them
Filed under Jackson
Learn different ways to read JSON documents as Maps and compare them.
Parallelize for Loop in Java
Filed under Java Concurrency
Learn different ways to parallelize a for loop in Java.
Mocking Private Fields With Mockito
Filed under Testing
Explore how to mock private fields with Mockito.
Converting JSON to XML in Java
Learn how to convert JSON to XML in Java.
Using OpenAI ChatGPT APIs in Spring Boot
Filed under Spring Boot
Learn how to use the API of OpenAI ChatGPT in Spring Boot applications.
OffsetDateTime Serialization With Jackson
Filed under Jackson, Java Dates
Learn how to serialize and deserialize OffsetDateTime with Jackson in Java.
Using Java Records with JPA
Filed under JPA
Learn how we can use records with JPA and Spring Data JPA.
New CRUD Repository Interfaces in Spring Data 3
Filed under Spring Data
Discover the new repository interfaces introduced in Spring Data 3.
Cassandra – Object Mapping with DataStax Java Driver
Filed under NoSQL, Spring Data
There are a few ways to map objects and operations to Cassandra. We look at how to use the DataStax driver to achieve object mapping, queries and native functions.
Spring MVC – Mapping the Root URL to a Page
Filed under Spring MVC
Learn how to map the root URL to a page in Spring MVC.
RESTful Microservices With RestExpress
Learn how to create a REST API using the open-source RestExpress framework.
Encoding of URI Variables on RestTemplate
Filed under Spring Boot, Spring Web
Learn two methods for encoding URI variables on Spring’s RestTemplate.
Reinitialize Singleton Bean in Spring Context
Filed under Spring
Learn multiple ways to reinitialize singleton Spring beans at runtime.
Mocking a Singleton With Mockito
Filed under Testing
Learn a few ways to write unit tests for singletons using Mockito.
JUnit – Testing Methods That Call System.exit()
Filed under Testing
Learn techniques for testing methods that call System.exit() when using JUnit.
Log4j2 – Logging to Both File and Console
Filed under Logging
Explore how to log messages to both file and console using the Apache Log4j2 library.
Spring Boot – Testing Redis With Testcontainers
Filed under Spring Boot, Testing
Learn how to use Testcontainers while testing a Spring Boot application that uses Redis.
Spring Data JPA – Run an App Without a Database
Filed under Spring Data
Learn how to start a Spring Boot application without having a running database when using Spring Data JPA.
Java HttpClient With SSL
Filed under Networking
Learn how to use the Java HttpClient to connect to HTTPS URLs and also find out how to bypass certificate verification in non-production environments.
Spring Cloud – Disable Discovery Clients with Profiles
Filed under Spring Cloud
While Spring’s service discovery mechanisms can be very helpful we may wish to turn them off in certain environments. We look at how to achieve this with both properties files and Spring profiles.
Spring Security – Configuring Different URLs
Filed under Spring Security
Learn how to configure URL security access.
Setting Example and Description with Swagger
Learn how to use Swagger annotations to make documentation more descriptive and readable.
Introduction to Spring Data Neo4j
Filed under Spring Data
A quick and practical intro to setting up and using Neo4J with the help of Spring Data Neo4j.
Baeldung on Kotlin
- All
- Spring (1)
- Patterns (1)
- Libraries (1)
- Kotlin (1)
- HTTP Client-Side (1)
equals() and hashCode() Generator in Kotlin
Filed under Kotlin
Explore how the equals() and hashCode() methods are generated for Kotlin’s data classes.
Strategy Design Pattern in Kotlin
Filed under Patterns
Explore the Strategy design pattern in Kotlin and understand the problem that the pattern solves.
RestTemplate Examples in Kotlin
Filed under HTTP Client-Side, Spring
Learn various methods provided by the RestTemplate class to make HTTP requests in Kotlin.
Mapstruct With Kotlin’s Data Classes
Filed under Libraries
Learn how to use Mapstruct to create mappings between data classes in Kotlin.
Baeldung on Ops
- All
- Docker (3)
Docker Registry API – Listing Images and Tags
Filed under Docker
Learn how to use the Docker Registry API to list images and tags in a remote registry.
Docker – Removing Dangling and Unused Images
Filed under Docker
Learn why dangling and unused images are common in Docker.
Running Docker Containers Indefinitely
Filed under Docker
A brief explanation about entrypoint and cmd to understand when a container terminates and how we can prevent it.