Skip to main content

Welcome to NamasteCode!

Explore our articles, code snippets, step-by-step guides, and best practices in Java, Spring, and software development.


Recent Articles

Http Requests With Rest Client in Spring Framework 6
Spring Restclient HTTP Rest Openai
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
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.
Configuring CORS in Spring Security 6
Spring-Security Cors Security-Filter-Chain Web
In this article, we explored how to configure CORS in Spring Security 6 by updating the SecurityFilterChain. We discussed both disabling CORS and setting up a custom CORS configuration to ensure your application remains secure and functional.
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.