RSSAmplifier

Blog

SivaLabs

Recent content on SivaLabs

sivalabs.inRSS feed ↗162 posts

Latest posts

Spring AI : Advisors API

Once an AI feature moves beyond a demo, the model call is rarely the whole story. You need to log requests, restore conversation history, retrieve relevant documents, reject unsafe input, record metrics, and perhaps validate the model’s output. Putting all of that code directly around every ChatClient call works for a while. Then a second endpoint arrives, followed by streaming, and suddenly…

Spring AI : Chat Memory

Large language models are stateless. Send two independent requests to a model, and the second request knows nothing about the first one. That is perfectly fine for one-shot questions, but it makes a chatbot feel surprisingly forgetful:

Spring AI : Structured Output

Chat models are great at producing prose, but most applications don&rsquo;t want prose — they want a Java object, a List<String> , or a Map they can bind to a response and return from a REST API. Spring AI&rsquo;s Structured Output Converters bridge that gap: they turn plain-text chat responses into typed Java objects, without you having to hand-write a JSON parser or repeat &ldquo;please respond…

Spring AI : Chat with LLMs

Calling an LLM is just an HTTP request. The trouble is that every provider has its own API, configuration, and response format. Spring AI handles that provider-specific plumbing and gives us a familiar Spring API. In this article, we will use ChatClient to talk to OpenAI&rsquo;s GPT-5 model and then make our prompts reusable with PromptTemplate .

Support Me

If my articles, videos, or tutorials helped you solve a problem or learn something new, consider buying me a coffee. Your support helps me keep creating free tutorials, videos, and open-source projects for the Java community.

Books

I have written books focused on helping developers learn Java and Spring Boot through practical examples.

Conferences

I speak at developer conferences, Java user groups, meetups, and internal engineering events on Java, Spring Boot, Architecture, Testing, and Developer Productivity. Speaker GIDS 2026 - Spring AI + MCP: Building the Missing Bridge Between Java Apps and AI Agents Spring I/O 2026 - Skyrocket Developer Productivity with Spring Boot & IntelliJ IDEA Naija JUG - Spring Boot : &ldquo;From Beginner to…

Courses

Free video courses from the SivaLabs YouTube channel.

Projects

1. testcontainers-jooq-codegen-maven-plugin A Maven plugin to run jOOQ code generation using Testcontainers, so database schema-based code generation can run consistently without requiring a locally installed database. 2. sivalabs-agent-skills A collection of Agent Skills and guidelines for Java/Spring Boot application development. 3. sdd-skills Agent Skills supporting Spec Driven Development with…

Don't Pollute Your Spring Boot Main EntryPoint Class

Most Spring Boot applications start with a beautifully boring main class. Then one day we need caching. We add @EnableCaching . Then we need async processing. We add @EnableAsync . Then scheduling. Then JPA auditing. Then maybe something else. Before we know it, the main class has become the place where every framework feature goes to live. At first glance, this feels harmless. The application…

Before You Judge, Get Curious

A few years ago, I was working at a fintech company in Germany. Our business unit planned to build a new offering for customers in Germany and the UK. Our team — product owner, business analyst, developers, and QA — gathered at a location and ran brainstorming sessions. Since we were also using the product ourselves, we were essentially both the builders and the end users.

Feeling Left Behind in Tech? This Is Your 90-Day Comeback Plan

You&rsquo;ve been working for years. You know your systems inside out. You&rsquo;ve solved real problems, handled pressure, and delivered results. But now you open a job description… and it feels like you&rsquo;re reading a different language. New frameworks. New tools. New expectations. And the thought creeps in: &ldquo;Have I fallen behind?&rdquo;

Stepping into Crazy AI World

If you are feeling overwhelmed by the rapid pace of technological advancements, especially in the field of AI, know that you are not alone. The AI landscape is evolving at an unbelievable speed, with new ideas and tools emerging every day.

The Power of Value Objects

A Value Object is a domain concept defined by its values rather than by identity. For example, we can represent EventId , EventCode or Email as a value object. In this article, let&rsquo;s explore the benefits of using value objects over primitive types.

Announcing FeatureTracker Application

As a Java Developer Advocate at JetBrains, I frequently demonstrate IntelliJ IDEA features through videos and articles. To do this, I usually create small demo applications focused on specific features. While this works well initially, the number of such applications grows quickly. Soon, it becomes difficult to remember which app was built for what purpose, turning it into a maintenance headache.

Protect Your Mental Health While Being On Social Media

Social media is a double-edged sword. If used properly, it can be immensely helpful. Personally, being on social media, especially on Twitter, helped me to connect with amazing people across the world. This in turn gave me a lot of opportunities such as learning from the experts, job opportunities, a chance to write books, speaking at conferences, etc.

You Can Code Offline With Local AI(Ollama)

ChatGPT and other Generative AI tools took the world by a storm. People are using these AI tools for various purposes such as to explore a topic, to seek answers to their questions or to get help in coding, etc. ChatGPT and Google&rsquo;s Gemini are very popular AI tools that are available for free with some usage limitations.

Spring Boot + Testcontainers Tests at Jet Speed

Spring Boot 3.1.0 introduced support for Testcontainers to simplify local development and testing. Testcontainers helps in writing tests using real dependencies instead of mocks, but it may also increase the test execution time.

My First Impression of Google's NotebookLM

I came across NotebookLM from my social media feed, and it looks interesting. With NotebookLM, you can upload documents, videos, web URLs and let the AI agents talk about the uploaded material. That sounds intriguing. Recently I wrote an article about software complexity and shared my viewpoint. Many people appreciated it and some people didn&rsquo;t. That is fine to have different opinions.

Running your own Spring Initializr and using it from IntelliJ IDEA

If you ever worked with Spring Boot , then you are probably aware of Spring Initializr . The Spring Initializr is a web application that you can use to create a Spring Boot application. Do you know Spring Initializr itself is an open-source Spring Boot application ? You can fork it, customize it, deploy on your infrastructure and use it to generate Spring Boot applications.

Master the Art of Requesting Technical Help: A Handy Email Template

As a software developer, at the beginning of my career, I thought it was more important to learn one more programming language or framework or library. But as years passed by, I realized it is also equally important to learn how to interact with people. Now remote work is becoming new normal and social media platforms like Twitter, LinkedIn, etc. are a common place to interact with people across…

About Me

K. Siva Prasad Reddy I am a software engineer, architect, trainer, and technical content creator. I have been building software professionally since 2006, with most of my work centered around Java, Spring Boot, distributed systems, and backend engineering. I enjoy taking complex technical ideas and explaining them through practical examples. That is the main reason behind SivaLabs: sharing…

Mastering Spring Boot in 5 Stages

Spring Boot is the most popular framework in the Java world to build enterprise applications. Also, Spring Boot is the most sought-after skill to get hired as a Java developer. Here is my recommended approach to learn Spring Boot.

Thymeleaf Layouts using Fragment Expressions in Spring Boot GraalVM Native Image

Typically, in Spring Boot + Thymeleaf applications, we use thymeleaf-layout-dialect to define the common layout of the web pages and it works fine. But when we compile the Spring Boot application to GraalVM native image, it is failing due to this error . I tried many suggestions mentioned in the above issue, but none of them worked for me.

Spring AI RAG using Embedding Models and Vector Databases

In this article, we will explore the following: Introduction to Embedding Models. Loading data using DocumentReaders. Storing embeddings in VectorStores. Implementing RAG (Retrieval-Augmented Generation), a.k.a. Prompt Stuffing. Let&rsquo;s get started.

Getting Started with Spring AI and OpenAI

In this article, we will explore the following: Introduction to Spring AI. Interacting with OpenAI using Spring AI. Using PromptTemplates . Using OutputConverters . Let&rsquo;s get started.

LangChain4j Retrieval-Augmented Generation (RAG) Tutorial

In this article, we will explore the following: Understand the need for Retrieval-Augmented Generation (RAG) . Understand EmbeddingModel , EmbeddingStore , DocumentLoaders , EmbeddingStoreIngestor . Working with different EmbeddingModels and EmbeddingStores. Ingesting data into EmbeddingStore. Querying LLMs with data from EmbeddingStore. Let&rsquo;s get started.

LangChain4j AiServices Tutorial

In this article, we will explore the following: Using LangChain4j AiServices to interact with LLMs. How to ask questions and map responses to different formats? Summarizing the given text in different formats. Analyzing the sentiment of the given text. Let&rsquo;s get started.

Generative AI Conversations using LangChain4j ChatMemory

In this article, we will explore the following: How to use LangChain4j ChatMemory and ConversationalChain to implement conversation style interaction? How to ask questions using PromptTemplate ? In the previous article , we have seen how to interact with OpenAI using Java and LangChain4j. Let&rsquo;s get started.

Getting Started with Generative AI using Java, LangChain4j, OpenAI and Ollama

In this article, we will explore the following: Brief introduction to Generative AI? How to interact with OpenAI APIs using Java? How to use LangChain4j to interact with OpenAI? How to run a LLM model locally using Ollama? Working with Ollama using LangChain4j and Testcontainers. Let&rsquo;s get started.

Should I use a framework or libraries?

In the software development world, trends come and go, and often we go through the same cycle again and again. It seems 2024 is the year of &ldquo;Framework vs Libraries&rdquo; debate. I mean this debate is not new, but it is getting louder again.

It's time to apply KISS principle to career

You might have heard from IT employees that there is no work-life balance in IT due to unrealistic deadlines, long working hours, etc. I did work crazy hours in the first 7 or 8 years of my career, but not anymore. Fortunately, I have been working in the companies that value work-life balance, and I never had to work beyond 8 hours in the recent past.

Go for Java/SpringBoot Developers

I have been using Java for more than 17 years, and I really like Java and its ecosystem. Within the Java ecosystem, Spring Boot is my go-to framework for building applications. I used the Go language for an official project a couple of years ago, and initially I had mixed feelings about it. But the more I use it, the more I like it.

My First Year at AtomicJar as a Developer Advocate

I joined AtomicJar as a Developer Advocate on 1st November 2022. Time flies when you are enjoying your work, doesn&rsquo;t it? Before joining AtomicJar, I worked as a TechLead/Architect at various companies for more than 15 years. When I got the opportunity to join AtomicJar, I was very excited to work with my favourite technology Testcontainers . I have been using Testcontainers for more than 4…

Spring Boot + jOOQ Tutorial - 5 : Fetching Many-to-Many Relationships

In the previous tutorial , we have learned how to fetch One-to-Many relationships using jOOQ. In this tutorial, we will learn how to fetch Many-to-Many relationships using jOOQ.

Spring Boot + jOOQ Tutorial - 4 : Fetching One-to-Many Relationships

In the previous tutorial , we have learned how to fetch One-to-One relationships using jOOQ. In this tutorial, we will learn how to fetch One-to-Many relationships using jOOQ.

Spring Boot + jOOQ Tutorial - 3 : Fetching One-to-One Relationships

In the previous tutorial , we have learned how to implement basic CRUD Operations using jOOQ. In this tutorial, we will learn how to fetch One-to-One relationships using jOOQ.

Spring Boot + jOOQ Tutorial - 2 : Implementing CRUD Operations

In the previous tutorial , we have seen how to generate jOOQ code using the testcontainers-jooq-codegen-maven-plugin and use jOOQ Typesafe DSL to execute SQL queries. In this tutorial, we will learn how to implement basic CRUD Operations using jOOQ.

Contact Me

You can reach out to us using any of the following channels: Twitter : @sivalabs LinkedIn : K Siva Prasad Reddy

Spring Boot + jOOQ Tutorial - 1 : Getting Started

jOOQ is a Java persistence library that provides SQL DSL for writing typesafe SQL queries. It supports most of the popular databases like MySQL , PostgreSQL , Oracle , SQL Server , and many more. In this tutorial, we will learn how to get started with jOOQ for implementing persistence layer in a Spring Boot application. You can also use jOOQ in other JVM based languages like Kotlin , Scala , etc.

Spring Security OAuth 2 Tutorial - 10 : Service to Service Communication using Client Credentials Flow

In this article, we will learn how to implement Service to Service Communication using Client Credentials Flow . We will create the archival-service in which we will use a scheduler job to invoke the messages-service APIs to archive the messages. For implementing this, we will use Client Credentials Flow .

Spring Security OAuth 2 Tutorial - 9 : Invoking Secured Resource Server APIs from Client Application

In the previous articles, we have created messages-webapp and messages-service and invoked API endpoints using Postman. In this article, we will learn how to invoke the secured messages-service API endpoints from the Client application messages-webapp .

Spring Security OAuth 2 Tutorial - 8 : Securing Resource Server

In the previous article, we have created messages-webapp and secured it with Spring Security OAuth 2.0 using Authorization Code Flow. In this article, we will create messages-service , which is a Spring Boot Resource Server, and secure it with Spring Security OAuth 2.0.

Spring Security OAuth 2 Tutorial - 7 : Securing Spring MVC Client Application

In this article, we will create messages-webapp which is a Spring MVC + Thymeleaf web application and secure it with Spring Security OAuth 2.0 using Keycloak .

Spring Security OAuth 2 Tutorial - 6 : Microservices Sample Project Setup

In the previous articles, we have learned about various OAuth 2.0 / OpenID Connect flows using web browser, cURL and Postman. Now it&rsquo;s time to put what we have learned into practice. What better way to do that than to build a sample project?

Spring Security OAuth 2 Tutorial - 5 : Implicit & Resource Owner Password Credentials Flows

In the Part 4: OAuth 2.0 Authorization Code Flow with PKCE , we learned how to acquire access_token using Authorization Code Flow with PKCE . In this article, we will explore how to use Implicit Flow and Resource Owner Password Credentials Flow .

Spring Security OAuth 2 Tutorial - 4 : Authorization Code Flow with PKCE

In the Part 3: OAuth 2.0 Client Credentials Flow , we learned how to acquire access_token using Client Credentials Flow . In this article, we will explore how to use Authorization Code Flow with PKCE .

Spring Security OAuth 2 Tutorial - 3 : Client Credentials Flow

In the Part 2: OAuth 2.0 Authorization Code Flow , we learned how to authenticate a user using Authorization Code Flow . In this article, we will explore how to use Client Credentials Flow that is typically used for Service-to-Service communication without any user (Resource Owner) context.

Spring Security OAuth 2 Tutorial - 2 : Authorization Code Flow

In the Part 1: Getting familiar with OAuth 2 concepts , we learned how to set up Keycloak, created a realm, a client with Standard flow enabled and a user. In this Part 2, you will learn how to authenticate a user using Authorization Code Flow .

Spring Security OAuth 2 Tutorial - 1 : Getting familiar with OAuth 2 concepts

Security is a complex topic to understand in-depth. In addition to that, implementing security for complex microservices based systems using OAuth 2.0 and OpenID Connect specs is even harder. Frameworks and libraries, like Spring Security , help to reduce the complexity, but still there is a steep learning curve to understand how to properly implement security.