{"id":69651,"date":"2025-06-20T09:43:20","date_gmt":"2025-06-20T01:43:20","guid":{"rendered":"https:\/\/hongtronics.com\/?p=69651"},"modified":"2025-06-20T09:53:53","modified_gmt":"2025-06-20T01:53:53","slug":"redis-springai-rag-solution-com","status":"publish","type":"post","link":"https:\/\/hongtronics.com\/en\/redis-springai-rag-solution-com\/","title":{"rendered":"Hong Hong Sharing | Building a Rag Application with Redis and Spring Ai"},"content":{"rendered":"<div data-elementor-type=\"wp-post\" data-elementor-id=\"69651\" class=\"elementor elementor-69651\" data-elementor-post-type=\"post\">\n\t\t\t\t<div class=\"elementor-element elementor-element-f325ac0 e-flex e-con-boxed e-con e-parent\" data-id=\"f325ac0\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-d5b0f81 elementor-widget elementor-widget-heading\" data-id=\"d5b0f81\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">summaries<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-b103529 e-flex e-con-boxed e-con e-parent\" data-id=\"b103529\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-f4ecc57 elementor-widget elementor-widget-text-editor\" data-id=\"f4ecc57\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div data-page-id=\"HhXCdEFmoodTFRxinpscLiO6nMh\" data-lark-html-role=\"root\" data-docx-has-block-data=\"false\"><p><span style=\"color: #000000;\"><span style=\"font-size: 12pt;\">This article introduces Spring AI.<span style=\"color: #000080;\"><strong>Supporting databases are key storage technologies in LLM-driven applications<\/strong><\/span>Previously, Spring had few options for launching AI applications built with Redis, and the Spring community is working on a Spring AI project to simplify development. The Search Augmented Generation (RAG) technology combines data and AI models, using the beer dataset as an example.<span style=\"color: #000080;\"><strong>Describes how loading data into Redis implements the RAG workflow.<\/strong><\/span>The code is available on GitHub and relies on Spring Boot, Azure OpenAI, etc. It also introduces the classes responsible for data loading, RAG processes, packaging HTTP endpoints, and the React interface to interact with Spring endpoints, making it easier for Java developers to build AI applications.<\/span><\/span><\/p><\/div>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-d61199b e-flex e-con-boxed e-con e-parent\" data-id=\"d61199b\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-fc214b6 elementor-widget elementor-widget-image\" data-id=\"fc214b6\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t<figure class=\"wp-caption\">\n\t\t\t\t\t\t\t\t\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"590\" src=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2024\/10\/pjxya-xrrk7-1024x590.webp\" class=\"attachment-large size-large wp-image-51984\" alt=\"Redis\u6578\u64da\u6d41\u53ef\u8996\u5316\" srcset=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2024\/10\/pjxya-xrrk7-1024x590.webp 1024w, https:\/\/hongtronics.com\/wp-content\/uploads\/2024\/10\/pjxya-xrrk7-300x173.webp 300w, https:\/\/hongtronics.com\/wp-content\/uploads\/2024\/10\/pjxya-xrrk7-768x442.webp 768w, https:\/\/hongtronics.com\/wp-content\/uploads\/2024\/10\/pjxya-xrrk7-600x346.webp 600w, https:\/\/hongtronics.com\/wp-content\/uploads\/2024\/10\/pjxya-xrrk7.webp 1200w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/>\t\t\t\t\t\t\t\t\t\t\t<figcaption class=\"widget-image-caption wp-caption-text\"><\/figcaption>\n\t\t\t\t\t\t\t\t\t\t<\/figure>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-6db7225 e-flex e-con-boxed e-con e-parent\" data-id=\"6db7225\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-c45f644 elementor-widget elementor-widget-heading\" data-id=\"c45f644\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Introduction to Spring AI<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-8a24098 e-flex e-con-boxed e-con e-parent\" data-id=\"8a24098\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-0a71334 elementor-widget elementor-widget-text-editor\" data-id=\"0a71334\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div data-page-id=\"HhXCdEFmoodTFRxinpscLiO6nMh\" data-lark-html-role=\"root\" data-docx-has-block-data=\"false\"><p data-start=\"348\" data-end=\"475\"><span style=\"font-size: 12pt; color: #333333;\">In Large Language Model (LLM)-driven applications, the provision of databases often serves as the core storage technology for Artificial Intelligence applications. Such databases need to support semantic search and provide the relevant contextual environment for LLM.<\/span><\/p><p data-start=\"348\" data-end=\"475\"><span style=\"font-size: 12pt; color: #333333;\">Until now, the options for building AI applications with Spring and Redis were relatively limited. Recently, Redis has attracted a lot of attention as a high-performance supporting database solution. <span style=\"color: #000080;\"><strong>The Spring community has launched a new project called Spring AI, which aims to streamline the development process for artificial intelligence applications, especially those involving supporting databases.<\/strong><\/span><\/span><\/p><p data-start=\"348\" data-end=\"475\"><span style=\"font-size: 12pt; color: #333333;\">The following section describes how to build a Spring AI application that implements a search augmentation generation (RAG) workflow using Redis as the backing database.<\/span><\/p><\/div>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-428a31c e-flex e-con-boxed e-con e-parent\" data-id=\"428a31c\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-84c8523 elementor-widget elementor-widget-heading\" data-id=\"84c8523\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Search Enhanced Generation<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-24fc4af e-flex e-con-boxed e-con e-parent\" data-id=\"24fc4af\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-c029aaf elementor-widget elementor-widget-text-editor\" data-id=\"c029aaf\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div data-page-id=\"HhXCdEFmoodTFRxinpscLiO6nMh\" data-lark-html-role=\"root\" data-docx-has-block-data=\"false\"><p data-start=\"348\" data-end=\"475\"><span style=\"font-size: 12pt; color: #333333;\"><span style=\"color: #000080;\"><strong>Retrieval Augmented Generation (RAG) is a technical approach that combines data with artificial intelligence models.<\/strong><\/span>In a RAG workflow, data is first loaded into a supporting database (e.g. Redis). Upon receiving a user query, the supporting database will retrieve a set of documents that are similar to the query. These documents are used as the context for answering the user's question and are combined with the user's query to generate a response, usually through an artificial intelligence model.<\/span><\/p><p data-start=\"348\" data-end=\"475\"><span style=\"font-size: 12pt; color: #333333;\"><strong><span style=\"color: #000080;\">In this example, we will demonstrate this using a dataset containing information about various types of beers, with attributes such as the name of the beer, the alcohol content (ABV), the International Bitterness Units (IBU), and the description.<\/span><\/strong>The dataset will be loaded into Redis to demonstrate a practical application of the RAG workflow.<\/span><\/p><\/div>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-f8df672 e-flex e-con-boxed e-con e-parent\" data-id=\"f8df672\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-c6d37cb elementor-widget elementor-widget-heading\" data-id=\"c6d37cb\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Codes and Dependencies<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-f82f5eb e-flex e-con-boxed e-con e-parent\" data-id=\"f82f5eb\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-68f1410 elementor-widget elementor-widget-text-editor\" data-id=\"68f1410\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div data-page-id=\"HhXCdEFmoodTFRxinpscLiO6nMh\" data-lark-html-role=\"root\" data-docx-has-block-data=\"false\"><p data-start=\"348\" data-end=\"475\"><span style=\"font-size: 12pt; color: #333333;\">It can be found on GitHub<a href=\"https:\/\/github.com\/redis-developer\/spring-ai-redis-demo\">Spring AI and Redis<\/a>All the code for the demo.<\/span><\/p><p data-start=\"348\" data-end=\"475\"><span style=\"color: #000080;\"><strong><span style=\"font-size: 12pt;\">This project uses Spring Boot as a startup dependency for web applications, and combines Azure OpenAI and Spring AI Redis.<\/span><\/strong><\/span><\/p><\/div>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-b409139 e-flex e-con-boxed e-con e-parent\" data-id=\"b409139\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-d195eac elementor-widget elementor-widget-heading\" data-id=\"d195eac\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Data Loading<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-5a77771 e-flex e-con-boxed e-con e-parent\" data-id=\"5a77771\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-458e514 elementor-widget elementor-widget-text-editor\" data-id=\"458e514\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div data-page-id=\"HhXCdEFmoodTFRxinpscLiO6nMh\" data-lark-html-role=\"root\" data-docx-has-block-data=\"false\"><p data-start=\"348\" data-end=\"475\"><span style=\"font-size: 12pt; color: #333333;\">Our application will use JSON files that provide beer information as a data source. The structure of each file is as follows:<\/span><\/p><\/div>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-2b1e556 e-flex e-con-boxed e-con e-parent\" data-id=\"2b1e556\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-4fbf677 elementor-widget elementor-widget-text-editor\" data-id=\"4fbf677\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div data-page-id=\"HhXCdEFmoodTFRxinpscLiO6nMh\" data-lark-html-role=\"root\" data-docx-has-block-data=\"false\"><div><span style=\"color: #000000;\"><span style=\"font-size: 16px;\">{<br \/>\u201cid\u201d: \u201c00gkb9\u201d.,<br \/>\u201cname\u201d: \u201cSmoked Porter Ale\u201d.,<br \/>\u201cdescription\u201d: \u201cThe Porter Pounder Smoked Porter is a dark rich flavored ale that is made with 5 malts that include smoked and chocolate roasted malts. It has coffee and mocha notes that create a long finish that ends clean with the use of just a bit of dry hopping \u201d,<br \/>\u201cabv\u201d: 8.,<br \/>\u201cibu\u201d: 36<br \/>}<\/span><\/span><\/div><\/div>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-80cfd74 e-flex e-con-boxed e-con e-parent\" data-id=\"80cfd74\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-effa070 elementor-widget elementor-widget-text-editor\" data-id=\"effa070\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div data-page-id=\"HhXCdEFmoodTFRxinpscLiO6nMh\" data-lark-html-role=\"root\" data-docx-has-block-data=\"false\"><p data-start=\"348\" data-end=\"475\"><span style=\"font-size: 12pt; color: #333333;\">To load the beer dataset into Redis, we will use the RagDataLoader class. This class contains a method that runs when the application starts. In this method, we use a JsonReader to parse the dataset and then insert the file into Redis using an automatically connected VectorStore.<\/span><\/p><\/div>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-54be60a e-flex e-con-boxed e-con e-parent\" data-id=\"54be60a\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-5fa7d8e elementor-widget elementor-widget-text-editor\" data-id=\"5fa7d8e\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div data-page-id=\"HhXCdEFmoodTFRxinpscLiO6nMh\" data-lark-html-role=\"root\" data-docx-has-block-data=\"false\"><div><span style=\"color: #000000;\"><span style=\"font-size: 16px;\">\/\/ Create a JSON reader with fields relevant to our use case JsonReader loader = new JsonReader(file, \u201cname\u201d, \u201c abv\u201d, \u201cibu\u201d, \u201cdescription\u201d); \/\/ Use the autowired VectorStore to insert the documents into Redis vectorStore.add(loader.get()); \/\/ Use the autowired VectorStore to insert the documents into Redis vectorStore.;<\/span><\/span><\/div><\/div>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-e5fcd78 e-flex e-con-boxed e-con e-parent\" data-id=\"e5fcd78\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-aa09e05 elementor-widget elementor-widget-text-editor\" data-id=\"aa09e05\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div data-page-id=\"HhXCdEFmoodTFRxinpscLiO6nMh\" data-lark-html-role=\"root\" data-docx-has-block-data=\"false\"><p data-start=\"348\" data-end=\"475\"><span style=\"font-size: 12pt; color: #333333;\">At this point, we have obtained a dataset of about 22,000 beers and their corresponding embeddings.<\/span><\/p><\/div>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-2061abd e-flex e-con-boxed e-con e-parent\" data-id=\"2061abd\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-96c4f3e elementor-widget elementor-widget-heading\" data-id=\"96c4f3e\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">RAG Services<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-f12c2c4 e-flex e-con-boxed e-con e-parent\" data-id=\"f12c2c4\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-1424c6b elementor-widget elementor-widget-text-editor\" data-id=\"1424c6b\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div data-page-id=\"HhXCdEFmoodTFRxinpscLiO6nMh\" data-lark-html-role=\"root\" data-docx-has-block-data=\"false\"><p data-start=\"348\" data-end=\"475\"><span style=\"font-size: 12pt; color: #333333;\">The RagService category implements the RAG workflow. When prompted by the user, it calls the retrieval method and performs the following steps:<\/span><\/p><ul style=\"list-style-type: disc;\"><li data-start=\"348\" data-end=\"475\"><span style=\"font-size: 12pt; color: #333333;\">Management of calculation of user prompts<\/span><\/li><li data-start=\"348\" data-end=\"475\"><span style=\"font-size: 12pt; color: #333333;\">Query the Redis database to retrieve the most relevant documents.<\/span><\/li><li data-start=\"348\" data-end=\"475\"><span style=\"font-size: 12pt; color: #333333;\">Creating alert messages using file and user alert searches<\/span><\/li><li data-start=\"348\" data-end=\"475\"><span style=\"font-size: 12pt; color: #333333;\">Use prompts to call the chat client to generate a response<\/span><\/li><\/ul><\/div>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-77f5fdb e-flex e-con-boxed e-con e-parent\" data-id=\"77f5fdb\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-f0447be elementor-widget elementor-widget-text-editor\" data-id=\"f0447be\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div data-page-id=\"HhXCdEFmoodTFRxinpscLiO6nMh\" data-lark-html-role=\"root\" data-docx-has-block-data=\"false\"><div><span style=\"color: #000000;\"><span style=\"font-size: 16px;\">public Generation retrieve(String message) {<br \/>SearchRequest request = SearchRequest.query(message).withTopK(topK);<br \/>\/\/ Query Redis for the top K documents most relevant to the input message<br \/>List docs = store.similaritySearch(request);<br \/>Message systemMessage = getSystemMessage(docs);<br \/>UserMessage userMessage = new UserMessage(message);<br \/>\/\/ Assemble the complete prompt using a template<br \/>Prompt prompt = new Prompt(List.of(systemMessage, userMessage));<br \/>\/\/ Call the autowired chat client with the prompt<br \/>ChatResponse response = client.call(prompt);<br \/>return response.getResult();<br \/>}<\/span><\/span><\/div><\/div>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-1869d33 e-flex e-con-boxed e-con e-parent\" data-id=\"1869d33\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-7e75753 elementor-widget elementor-widget-heading\" data-id=\"7e75753\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">controllers<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-6d3ef7d e-flex e-con-boxed e-con e-parent\" data-id=\"6d3ef7d\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-5948f92 elementor-widget elementor-widget-text-editor\" data-id=\"5948f92\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div data-page-id=\"HhXCdEFmoodTFRxinpscLiO6nMh\" data-lark-html-role=\"root\" data-docx-has-block-data=\"false\"><p data-start=\"348\" data-end=\"475\"><span style=\"font-size: 12pt; color: #333333;\">Now that we have implemented the RAG service, we can encapsulate it in an HTTP endpoint.<br \/>The RagController class exposes the service as a POST endpoint:<\/span><\/p><\/div>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-efee302 e-flex e-con-boxed e-con e-parent\" data-id=\"efee302\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-519d022 elementor-widget elementor-widget-text-editor\" data-id=\"519d022\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div data-page-id=\"HhXCdEFmoodTFRxinpscLiO6nMh\" data-lark-html-role=\"root\" data-docx-has-block-data=\"false\"><div><span style=\"color: #000000;\"><span style=\"font-size: 16px;\">@PostMapping(\u201c\/chat\/{chatId}\u201d)<br \/>@ResponseBody<br \/>public Message chatMessage(@PathVariable(\u201cchatId\u201d) String chatId, @RequestBody Prompt prompt) {<br \/>\/\/ Extract the user prompt from the body and pass it to the autowired RagService<br \/>Generation generation = ragService.retrieve(prompt.getPrompt());<br \/>\/\/ Reply with the generated message<br \/>return Message.of(generation.getOutput().getContent());<br \/>}<\/span><\/span><\/div><\/div>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-8426bc9 e-flex e-con-boxed e-con e-parent\" data-id=\"8426bc9\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-a880508 elementor-widget elementor-widget-heading\" data-id=\"a880508\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">user interface <\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-19589db e-flex e-con-boxed e-con e-parent\" data-id=\"19589db\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-f61085a elementor-widget elementor-widget-text-editor\" data-id=\"f61085a\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div data-page-id=\"HhXCdEFmoodTFRxinpscLiO6nMh\" data-lark-html-role=\"root\" data-docx-has-block-data=\"false\"><p data-start=\"348\" data-end=\"475\"><span style=\"font-size: 12pt; color: #333333;\">On the user interface side, a simple React front-end was created to allow users to ask questions about beer. The frontend interacts with Spring by sending HTTP requests to the \/chat\/{chatId} endpoint and displaying the responses.<\/span><\/p><\/div>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-223ffd1 e-flex e-con-boxed e-con e-parent\" data-id=\"223ffd1\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-483358a elementor-widget elementor-widget-image\" data-id=\"483358a\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t<figure class=\"wp-caption\">\n\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"1024\" height=\"506\" src=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2025\/06\/azz4p-84fn2.webp\" class=\"attachment-large size-large wp-image-69657\" alt=\"Spring AI\u4f7f\u7528\u8005\u4ecb\u9762\" srcset=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2025\/06\/azz4p-84fn2.webp 1024w, https:\/\/hongtronics.com\/wp-content\/uploads\/2025\/06\/azz4p-84fn2-300x148.webp 300w, https:\/\/hongtronics.com\/wp-content\/uploads\/2025\/06\/azz4p-84fn2-768x380.webp 768w, https:\/\/hongtronics.com\/wp-content\/uploads\/2025\/06\/azz4p-84fn2-600x296.webp 600w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/>\t\t\t\t\t\t\t\t\t\t\t<figcaption class=\"widget-image-caption wp-caption-text\"><\/figcaption>\n\t\t\t\t\t\t\t\t\t\t<\/figure>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-c62e401 e-flex e-con-boxed e-con e-parent\" data-id=\"c62e401\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-e9b1f51 elementor-widget elementor-widget-text-editor\" data-id=\"e9b1f51\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div data-page-id=\"HhXCdEFmoodTFRxinpscLiO6nMh\" data-lark-html-role=\"root\" data-docx-has-block-data=\"false\"><p data-start=\"348\" data-end=\"475\"><span style=\"color: #000080;\"><strong><span style=\"font-size: 12pt;\">With just a few simple classes, we implemented a RAG application using Spring AI and Redis.<\/span><\/strong><\/span><\/p><p data-start=\"348\" data-end=\"475\"><span style=\"font-size: 12pt; color: #333333;\">Next, we recommend that you<a href=\"https:\/\/github.com\/redis-developer\/spring-ai-redis-demo\"><u>View sample code on Github<\/u><\/a>Combining the efficiency and ease of use of Redis with the convenient abstractions provided by Spring AI will make it easier for Java developers to use Spring architectural response AI applications. By combining the efficiency and ease of use of Redis with the convenient abstractions provided by Spring AI, it becomes easier for Java developers to respond to AI applications using Spring constructs.<\/span><\/p><p data-start=\"348\" data-end=\"475\"><span style=\"font-size: 12pt; color: #333333;\">For more information about the support database, please feel free to contact us.<\/span><\/p><\/div>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-c417b1c e-flex e-con-boxed e-con e-parent\" data-id=\"c417b1c\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-806d311 elementor-widget elementor-widget-heading\" data-id=\"806d311\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Learn more about our products<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-a142af4 e-flex e-con-boxed e-con e-parent\" data-id=\"a142af4\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t<div class=\"elementor-element elementor-element-ec9e379 e-con-full e-flex e-con e-child\" data-id=\"ec9e379\" data-element_type=\"container\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t<div class=\"elementor-element elementor-element-ae93edc elementor-widget elementor-widget-image\" data-id=\"ae93edc\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"700\" height=\"700\" src=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2025\/05\/Redis-\u4f01\u696d\u96f2.webp\" class=\"attachment-large size-large wp-image-67577\" alt=\"\" srcset=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2025\/05\/Redis-\u4f01\u696d\u96f2.webp 700w, https:\/\/hongtronics.com\/wp-content\/uploads\/2025\/05\/Redis-\u4f01\u696d\u96f2-300x300.webp 300w, https:\/\/hongtronics.com\/wp-content\/uploads\/2025\/05\/Redis-\u4f01\u696d\u96f2-150x150.webp 150w, https:\/\/hongtronics.com\/wp-content\/uploads\/2025\/05\/Redis-\u4f01\u696d\u96f2-600x600.webp 600w, https:\/\/hongtronics.com\/wp-content\/uploads\/2025\/05\/Redis-\u4f01\u696d\u96f2-100x100.webp 100w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-208ba4c elementor-align-center elementor-widget__width-inherit elementor-widget elementor-widget-button\" data-id=\"208ba4c\" data-element_type=\"widget\" data-widget_type=\"button.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-button-wrapper\">\n\t\t\t\t\t<a class=\"elementor-button elementor-button-link elementor-size-sm\" href=\"https:\/\/hongtronics.com\/en\/product\/redis-enterprise-cloud\/\">\n\t\t\t\t\t\t<span class=\"elementor-button-content-wrapper\">\n\t\t\t\t\t\t\t\t\t<span class=\"elementor-button-text\">Product Information<\/span>\n\t\t\t\t\t<\/span>\n\t\t\t\t\t<\/a>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0a76b70 elementor-widget__width-inherit elementor-widget elementor-widget-text-editor\" data-id=\"0a76b70\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<h3 style=\"text-align: center;\">\u00a0<span style=\"color: #273171;\"><span style=\"font-size: 16px;\">Redis Enterprise Cloud<\/span><\/span><\/h3><p><span style=\"font-size: 12pt; color: #000000;\">\u25cf Real-time data, any scale, any deployment space<\/span><\/p><p><span style=\"font-size: 12pt; color: #000000;\">\u25cf Seamless data migration<\/span><\/p><p><span style=\"font-size: 12pt; color: #000000;\">:: True high availability<\/span><\/p><p><span style=\"font-size: 12pt; color: #000000;\">\u25cf Linear scalability and real-time performance<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-8db7c83 e-con-full e-flex e-con e-child\" data-id=\"8db7c83\" data-element_type=\"container\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t<div class=\"elementor-element elementor-element-e5b8e90 elementor-widget elementor-widget-image\" data-id=\"e5b8e90\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"700\" src=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2025\/05\/Redis-\u4f01\u696d\u7d1a\u6578\u64da\u5eab.webp\" class=\"attachment-large size-large wp-image-67578\" alt=\"Redis \u4f01\u696d\u7d1a\u6578\u64da\u5eab\" srcset=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2025\/05\/Redis-\u4f01\u696d\u7d1a\u6578\u64da\u5eab.webp 700w, https:\/\/hongtronics.com\/wp-content\/uploads\/2025\/05\/Redis-\u4f01\u696d\u7d1a\u6578\u64da\u5eab-300x300.webp 300w, https:\/\/hongtronics.com\/wp-content\/uploads\/2025\/05\/Redis-\u4f01\u696d\u7d1a\u6578\u64da\u5eab-150x150.webp 150w, https:\/\/hongtronics.com\/wp-content\/uploads\/2025\/05\/Redis-\u4f01\u696d\u7d1a\u6578\u64da\u5eab-600x600.webp 600w, https:\/\/hongtronics.com\/wp-content\/uploads\/2025\/05\/Redis-\u4f01\u696d\u7d1a\u6578\u64da\u5eab-100x100.webp 100w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0db13ac elementor-widget__width-inherit elementor-widget elementor-widget-text-editor\" data-id=\"0db13ac\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<h3 style=\"text-align: center;\"><span style=\"color: #273171;\"><span style=\"font-size: 16px;\">Redis Enterprise Database<\/span><\/span><\/h3><p><span style=\"color: #000000; font-size: 12pt;\">\u25cf\u00a0<\/span><span style=\"color: #000000;\"><span style=\"font-size: 16px;\">\u00a0High-performance caching for business-critical applications<\/span><\/span><\/p><p><span style=\"color: #000000; font-size: 12pt;\">\u25cf\u00a0\u00a0<\/span><span style=\"color: #000000;\"><span style=\"font-size: 16px;\">Build local and cloud applications using modern data models<\/span><\/span><\/p><p><span style=\"color: #000000; font-size: 12pt;\">\u25cf\u00a0<\/span><span style=\"color: #000000;\"><span style=\"font-size: 16px;\">Easily Migrate Local Data to the Cloud and Deploy Across Regions with Active-Active<\/span><\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a7732c9 elementor-align-center elementor-widget__width-inherit elementor-absolute elementor-widget elementor-widget-button\" data-id=\"a7732c9\" data-element_type=\"widget\" data-settings=\"{&quot;_position&quot;:&quot;absolute&quot;}\" data-widget_type=\"button.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-button-wrapper\">\n\t\t\t\t\t<a class=\"elementor-button elementor-button-link elementor-size-sm\" href=\"https:\/\/hongtronics.com\/en\/product\/redis-database\/\">\n\t\t\t\t\t\t<span class=\"elementor-button-content-wrapper\">\n\t\t\t\t\t\t\t\t\t<span class=\"elementor-button-text\">Product Information<\/span>\n\t\t\t\t\t<\/span>\n\t\t\t\t\t<\/a>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-a805220 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"a805220\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-a038780\" data-id=\"a038780\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-155fcc3 elementor-widget-divider--view-line elementor-widget elementor-widget-divider\" data-id=\"155fcc3\" data-element_type=\"widget\" data-widget_type=\"divider.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-divider\">\n\t\t\t<span class=\"elementor-divider-separator\">\n\t\t\t\t\t\t<\/span>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0398a96 e-transform elementor-widget elementor-widget-text-editor\" data-id=\"0398a96\" data-element_type=\"widget\" data-settings=\"{&quot;_transform_rotateZ_effect&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;_transform_rotateZ_effect_tablet&quot;:{&quot;unit&quot;:&quot;deg&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;_transform_rotateZ_effect_mobile&quot;:{&quot;unit&quot;:&quot;deg&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]}}\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><span style=\"font-size: 14pt; color: #273171;\"><strong>If you are interested, you are welcome to follow us for more information about the article and contact us if you have any questions!<\/strong><\/span><\/p><footer class=\"product-footer\"><div class=\"additional-info\"><div class=\"related-articles\"><h3><span style=\"color: #000000;\">Extended Reading:<\/span><\/h3><p style=\"padding-left: 40px;\"><a style=\"color: #13aff0; text-decoration-style: dotted; text-decoration-skip-ink: none;\" href=\"https:\/\/hongtronics.com\/en\/redis-ai-solutions-com\/\"><span style=\"font-size: 12pt; color: #3498db;\">\u27a4Honghong Shares\u4e28Redis for AI: A New Tool for Constructing Intelligent Applications and Improving Development Efficiency<\/span><\/a><\/p><p style=\"padding-left: 40px;\"><a style=\"color: #13aff0; text-decoration-style: dotted; text-decoration-skip-ink: none;\" href=\"https:\/\/hongtronics.com\/en\/redis-vector-search-com\/\"><span style=\"font-size: 12pt; color: #3498db;\">\u00e3\u20ac\u20ac\u00e3\u20ac\u20ac\u00e3\u20ac\u20ac\u00e3\u20ac\u20ac\u00e3\u20ac\u20acRedis 8 Vector Search Test: Scaling to 1 Billion Vectors Easily<\/span><\/a><\/p><\/div><\/div><\/footer>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e7b863e elementor-widget elementor-widget-image\" data-id=\"e7b863e\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"197\" src=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2024\/06\/\u516c\u53f8\u8cc7\u8a0a\u6b04_\u8cc7\u8a0a\u5361-\u592702-1.png\" class=\"attachment-large size-large wp-image-40098\" alt=\"\" srcset=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2024\/06\/\u516c\u53f8\u8cc7\u8a0a\u6b04_\u8cc7\u8a0a\u5361-\u592702-1.png 1024w, https:\/\/hongtronics.com\/wp-content\/uploads\/2024\/06\/\u516c\u53f8\u8cc7\u8a0a\u6b04_\u8cc7\u8a0a\u5361-\u592702-1-300x58.png 300w, https:\/\/hongtronics.com\/wp-content\/uploads\/2024\/06\/\u516c\u53f8\u8cc7\u8a0a\u6b04_\u8cc7\u8a0a\u5361-\u592702-1-768x148.png 768w, https:\/\/hongtronics.com\/wp-content\/uploads\/2024\/06\/\u516c\u53f8\u8cc7\u8a0a\u6b04_\u8cc7\u8a0a\u5361-\u592702-1-600x115.png 600w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>","protected":false},"excerpt":{"rendered":"<p>\u6458\u8981 \u672c\u6587\u4ecb\u7d39\u4e86 Spring AI\u3002\u5728 LLM \u9a45\u52d5\u7684\u61c9\u7528\u4e2d\uff0c\u652f\u63f4\u8cc7\u6599\u5eab\u662f\u95dc\u9375\u5132\u5b58\u6280\u8853\uff0c\u4ee5\u524d Spring  [&hellip;]<\/p>","protected":false},"author":42,"featured_media":69652,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_eb_attr":"","ocean_post_layout":"","ocean_both_sidebars_style":"","ocean_both_sidebars_content_width":0,"ocean_both_sidebars_sidebars_width":0,"ocean_sidebar":"","ocean_second_sidebar":"","ocean_disable_margins":"enable","ocean_add_body_class":"","ocean_shortcode_before_top_bar":"","ocean_shortcode_after_top_bar":"","ocean_shortcode_before_header":"","ocean_shortcode_after_header":"","ocean_has_shortcode":"","ocean_shortcode_after_title":"","ocean_shortcode_before_footer_widgets":"","ocean_shortcode_after_footer_widgets":"","ocean_shortcode_before_footer_bottom":"","ocean_shortcode_after_footer_bottom":"","ocean_display_top_bar":"default","ocean_display_header":"default","ocean_header_style":"","ocean_center_header_left_menu":"","ocean_custom_header_template":"","ocean_custom_logo":0,"ocean_custom_retina_logo":0,"ocean_custom_logo_max_width":0,"ocean_custom_logo_tablet_max_width":0,"ocean_custom_logo_mobile_max_width":0,"ocean_custom_logo_max_height":0,"ocean_custom_logo_tablet_max_height":0,"ocean_custom_logo_mobile_max_height":0,"ocean_header_custom_menu":"","ocean_menu_typo_font_family":"","ocean_menu_typo_font_subset":"","ocean_menu_typo_font_size":0,"ocean_menu_typo_font_size_tablet":0,"ocean_menu_typo_font_size_mobile":0,"ocean_menu_typo_font_size_unit":"px","ocean_menu_typo_font_weight":"","ocean_menu_typo_font_weight_tablet":"","ocean_menu_typo_font_weight_mobile":"","ocean_menu_typo_transform":"","ocean_menu_typo_transform_tablet":"","ocean_menu_typo_transform_mobile":"","ocean_menu_typo_line_height":0,"ocean_menu_typo_line_height_tablet":0,"ocean_menu_typo_line_height_mobile":0,"ocean_menu_typo_line_height_unit":"","ocean_menu_typo_spacing":0,"ocean_menu_typo_spacing_tablet":0,"ocean_menu_typo_spacing_mobile":0,"ocean_menu_typo_spacing_unit":"","ocean_menu_link_color":"","ocean_menu_link_color_hover":"","ocean_menu_link_color_active":"","ocean_menu_link_background":"","ocean_menu_link_hover_background":"","ocean_menu_link_active_background":"","ocean_menu_social_links_bg":"","ocean_menu_social_hover_links_bg":"","ocean_menu_social_links_color":"","ocean_menu_social_hover_links_color":"","ocean_disable_title":"default","ocean_disable_heading":"default","ocean_post_title":"","ocean_post_subheading":"","ocean_post_title_style":"","ocean_post_title_background_color":"","ocean_post_title_background":0,"ocean_post_title_bg_image_position":"","ocean_post_title_bg_image_attachment":"","ocean_post_title_bg_image_repeat":"","ocean_post_title_bg_image_size":"","ocean_post_title_height":0,"ocean_post_title_bg_overlay":0.5,"ocean_post_title_bg_overlay_color":"","ocean_disable_breadcrumbs":"default","ocean_breadcrumbs_color":"","ocean_breadcrumbs_separator_color":"","ocean_breadcrumbs_links_color":"","ocean_breadcrumbs_links_hover_color":"","ocean_display_footer_widgets":"default","ocean_display_footer_bottom":"default","ocean_custom_footer_template":"","iawp_total_views":115,"ocean_post_oembed":"","ocean_post_self_hosted_media":"","ocean_post_video_embed":"","ocean_link_format":"","ocean_link_format_target":"self","ocean_quote_format":"","ocean_quote_format_link":"post","ocean_gallery_link_images":"on","ocean_gallery_id":[],"footnotes":""},"categories":[2302],"tags":[2044,4256,3199],"table_tags":[4258,4257,4259],"class_list":["post-69651","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-redis","tag-redis","tag-spring-ai","tag-3199","table_tags-redis","table_tags-spring-ai","table_tags-4259","entry","has-media","owp-thumbs-layout-horizontal","owp-btn-normal","owp-tabs-layout-horizontal","has-no-thumbnails","has-product-nav"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/hongtronics.com\/wp-content\/uploads\/2025\/06\/aa3zs-iq9gz.webp","_links":{"self":[{"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/posts\/69651","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/users\/42"}],"replies":[{"embeddable":true,"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/comments?post=69651"}],"version-history":[{"count":10,"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/posts\/69651\/revisions"}],"predecessor-version":[{"id":69664,"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/posts\/69651\/revisions\/69664"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/media\/69652"}],"wp:attachment":[{"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/media?parent=69651"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/categories?post=69651"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/tags?post=69651"},{"taxonomy":"table_tags","embeddable":true,"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/table_tags?post=69651"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}