Posts

Showing posts with the label Java

Building a Retrieval-Augmented Generation (RAG) Application with Ollama 3.2 and Spring Boot

Building a RAG Application with Ollama 3.2 and Spring Boot This blog post demonstrates how to build a Retrieval-Augmented Generation (RAG) application using Ollama 3.2 for large language models (LLMs) and Spring Boot for creating REST APIs. RAG combines information retrieval with LLMs to provide more accurate and contextually relevant answers. We'll leverage Docker Desktop for containerization and pgvector for vector storage. Project Setup We'll use Spring Boot version 3.3.7 for this project. Here's a breakdown of the key components and configurations: 1. Dependencies (Gradle): dependencies { implementation 'org.springframework.boot:spring-boot-starter-jdbc' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'com.fasterxml.jackson.module:jackson-module-kotlin' implementation 'org.springframework.ai:spring-ai-ollama-spring-boot-starter' ...

Securing Microservices with JWT Authentication and Data Encryption

Securing Microservices with JWT Authentication and Data Encryption Securing Microservices with JWT Authentication and Data Encryption In modern microservices architectures, securing communication and data integrity are paramount. This article explores how JWT (JSON Web Token) authentication and data encryption can bolster security, ensuring that data exchanges between services remain confidential and trusted. What is JWT Authentication? JWT is a compact, URL-safe token format that securely transmits information between parties as a JSON object. It is widely used in microservices for its simplicity and efficiency. Parts of a JWT Token A JSON Web Token (JWT) consists of three parts, separated by periods ( . ): Header: Specifies the token type ( JWT ) and signing algorithm (e.g., HS256 or RS256 ). Example:...