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. 😄
Create Docker Image From Java Application
Learn how to create a Docker image from a Java application by configuring Maven to package the app as an executable JAR, then building a lightweight container using a Dockerfile.
How to Upload File in Spring Boot
Learn how to implement file uploads in Spring Boot, configure size limits, and handle potential errors gracefully using Thymeleaf and Spring MVC.
Http Requests With Rest Client in Spring Framework 6
This tutorial explains how to use the RestClient API in Spring 6.1 for making HTTP requests. We cover setting up and customizing the RestClient, handling requests (GET, POST, PUT, DELETE), and provide an example of using it with the OpenAI API. We also discuss error handling. By the end, we’ll know how to effectively use RestClient in our projects and understand its advantages over RestTemplate.
Create a RAG Chatbot With Spring AI
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
Learn how to use the @Scheduled annotation in Spring with cron expressions.
Testcontainers in Spring Boot Integration Tests
Learn how to use testcontainers in a Spring boot application when creating integration tests.
Get Values Defined in Properties File in Spring
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.