Harpal Singh
Hi, I am Harpal, a software engineer from Italy. I created Namaste Code to share my knowledge and experience with the world. I hope you find the content useful. 😄
2024
Create a RAG Chatbot With Spring AI
Spring-Ai
Rag
Vaadin
Web
Pgvector
This guide explains how to create a Retrieval-Augmented Generation (RAG) chatbot using Spring AI and Vaadin. It covers project setup, application configuration, backend and frontend development, document parsing with TikaDocumentReader, embedding generation with OpenAI, and storage in PostgreSQL using PGvector. It also shows how to build a chat interface for interacting with uploaded documents.
Understanding Spring's @Scheduled Cron Syntax
Spring
Cron
Scheduling
Learn how to use the @Scheduled annotation in Spring with cron expressions.
Configuring Multiple Data Sources in a Spring Boot
Spring
Database
Learn to configure multiple data sources in a Spring Boot application, enabling the use of separate databases and specific data sources for Spring Data JPA repositories.
Testcontainers in Spring Boot Integration Tests
Spring
Testcontainers
Testing
Learn how to use testcontainers in a Spring boot application when creating integration tests.
Get Values Defined in Properties File in Spring
Spring
Properties
Basics
Learn how to access values defined in a properties file in a Spring Boot application. Define properties in a properties file and access them in a Spring service.
Returning HTTP 4XX Errors in a Spring Application
Spring
HTTP
Learn how to return HTTP 4XX errors in Spring applications. Use ResponseEntity to set the appropriate HTTP status code and response body.
Configuring the Port for a Spring Boot Application
Spring
Basics
Learn how to configure the server port for a Spring Boot application. Set the port in the application.properties file, command-line arguments, or system properties.
Configuring a Java Web Client for HTTPS Requests
WebClient
HTTPS
Spring
Learn how to configure a Java Web Client for HTTPS requests. Secure your HTTP communication with encryption to protect user data.
How to Retry Using Restclient
Spring-Boot
Restclient
Learn how to implement retryable calls using RestClient with the support of spring-retry. Handle temporary failures in making HTTP requests systematically.
Running PostgreSQL in Docker Container
DevOps
Postgres
Docker
Database
Learn how to run PostgreSQL in a Docker container with this step-by-step tutorial. Leverage Docker for easy setup and portability of your PostgreSQL database.