Building a Streaming AI Chat UI with HTMX

A common way to build an AI chat UI is a React or Vue frontend project built and bundled with npm, hooked up to the backend’s streami...

In spring boot, Sep 09, 2026

All Stories

Building a Streaming AI Chat UI with HTMX

A common way to build an AI chat UI is a React or Vue frontend project built and bundled with npm, hooked up to the backend’s streaming API. With htmx and Thymeleaf, however, you can ...

In spring boot, Sep 09, 2026

Implementing an MCP Server with Spring AI

MCP (Model Context Protocol) is an open protocol for connecting LLMs to external tools and data sources. Spring AI provides MCP server and client integrations, wrapping the protocol d...

In spring boot, Aug 29, 2026

Securing WeChat Mini Programs with Spring Authorization Server

WeChat mini programs are a typical native client application: there is no browser address bar, so the redirect interactions that the OAuth2 authorization code flow relies on cannot ha...

In spring boot, Aug 22, 2026

Integrating the DeepSeek LLM with Spring AI

Spring AI is the official Spring framework for integrating large language models, connecting to LLMs of all kinds through a unified set of abstraction interfaces. DeepSeek is a popula...

In spring boot, Aug 01, 2026

Integrating Vue with Spring Authorization Server

Protect a Vue application with Spring Authorization Server.

In spring boot, Dec 31, 2025

Advanced Spring Security Usage

Advanced usage of Spring Security, including a loginUrl carrying custom parameters, custom authentication logic, and custom authorization logic.

In spring boot, Jan 27, 2025

Modifying RequestBody Globally in Spring

When writing RestControllers, several endpoints may share the same RequestBody, and in some scenarios we need to modify the incoming RequestBody values. Modifying it in every controll...

In spring boot, Jul 06, 2024

How to Set a DNS Resolution Timeout for Spring RestTemplate

The usual timeout settings of RestTemplate cover the connect timeout, the request timeout, and the response timeout, but there is often no simple way to set a DNS resolution timeout. ...

In spring boot, Jun 16, 2024

Dynamically Controlling Scheduled Tasks in Spring

In the Spring framework, simple scheduled tasks can be implemented with the @Scheduled annotation. In real-world projects, however, we often need to control scheduled tasks dynamicall...

In spring boot, Jan 07, 2024

Three Ways to Build Flexible Queries with Spring Data

When displaying list data on a page, we usually need to return different query results based on the different conditions the user enters. The traditional approach is to manually write...

In spring boot, Dec 27, 2023

Spring Boot 3.2 New Feature: HTTP Interface

Spring Boot 3.2 introduces the new HTTP interface for calling HTTP APIs, in a style similar to openfeign.

In spring boot, Dec 24, 2023

Spring Boot 3.2 New Feature: RestClient

Spring Boot 3.2 introduces the new RestClient for calling HTTP APIs, with a fluent API style that supports chained calls.

In spring boot, Dec 03, 2023

Spring Boot 3.2 New Feature: JdbcClient

Spring Boot 3.2 introduces the new JdbcClient for database operations. JdbcClient wraps JdbcTemplate and adopts a fluent API style that supports chained calls.

In spring boot, Nov 26, 2023

Conditional Audit Records with Spring Data Envers

Data auditing is a basic capability of business systems: the system needs to persist the change history of key data and support querying that history.

In spring boot, Oct 15, 2023

Logging Request and Response Content with Spring RestTemplate

Applications often need to call third-party APIs to implement business features. To make debugging and troubleshooting easier, we usually need to log the request parameters and the re...

In spring boot, May 03, 2023

The Lightweight Rules Engine easy-rules

Using a rules engine properly can greatly reduce code complexity and improve code maintainability. The best-known open-source rules engine in the industry is Drools — feature-rich, bu...

In spring boot, Mar 26, 2023

Dynamic Backend Forwarding with Spring Cloud Gateway

The core function of an API gateway is to unify the traffic entry point and perform route forwarding. SpringCloudGateway is one of the technologies for building API gateways; other po...

In spring boot, Feb 19, 2023

AOT (GraalVM Native Image) Application Development with Spring Boot 3

GraalVM Native Images is a compilation tool that uses AOT (Ahead-of-Time) technology to compile Java programs directly into native executables. The resulting program no longer depends...

In spring boot, Nov 26, 2022

Introduction to the New ElasticSearch Java Client

Before version 7.17, the Java client for ElasticSearch was the Java REST Client. Starting with version 7.17, the official team marked the Java REST Client as deprecated and recommende...

In spring boot, Apr 17, 2022

Converting LocalDateTime to Epoch Timestamps in Spring REST APIs

This post shows how to convert the LocalDateTime date type to timestamps in Spring REST APIs.The complete code is available in the example project https://github.com/qihaiyan/springca...

In spring boot, Apr 04, 2022

Custom Cache Resolver in Spring

This post describes how to build a custom cache resolver in Spring. With a custom resolver, extra processing can be added to Spring’s cache annotations.The complete code is available ...

In spring boot, Mar 13, 2022

Three Ways to Use Kafka in Spring (listener, container, stream)

This post introduces three ways to use Kafka with Spring: the container approach is the most flexible but relatively complex to develop, the stream approach is the simplest to use, an...

In spring boot, Oct 31, 2021

Integrating Groovy Scripts in Spring Boot

Introducing scripting capability into our application can greatly improve flexibility: core development work can focus on building core platform capabilities, while functionality for ...

In spring boot, May 05, 2021

Spring Boot Unit Testing Techniques

Throughout the software delivery process, the unit testing stage is the earliest point where defects can be discovered, and the stage where they can be regression-tested repeatedly. T...

In spring boot, Apr 18, 2021

Deadlock Caused by Misusing Spring's Built-in Thread Pool

Spring’s built-in thread pool is very convenient to use, but in relatively complex concurrency scenarios you still need to think carefully about the configuration for your use case, o...

In spring boot, Jan 10, 2021

Logging HTTP Requests and Responses in Spring

Logging the content of API requests and responses is a basic technical requirement. Implementing request and response logging in every endpoint would be very tedious. Instead, we can ...

In spring boot, Nov 22, 2020

Spring Dynamic Datasource: Add a New Datasource by Configuration Only

In real-world business scenarios, we often run into situations where datasources need to be configured dynamically: adding a new datasource should only require a configuration change,...

In spring boot, Sep 16, 2020

Java Concurrency Programming: Multithreading, Atomicity, and Visibility

Commonly used Java concurrency programming techniques.The complete code is available in the example project https://github.com/qihaiyan/springcamp/tree/main/spring-currency.

In spring boot, Apr 12, 2020

Reactive Programming (Part 3): A Simple HTTP Service

Continuing from the previous article on Reactive programming: we have covered the basic API, and now we start building a real application. Reactive is a good abstraction over concurre...

In spring boot, Mar 25, 2018

Reactive Programming (Part 2): Code Demonstration

Continuing from the previous article on Reactive programming, we keep explaining concepts with real code. We will go a step further in understanding what makes reactive different and ...

In spring boot, Mar 18, 2018

Reactive Programming (Part 1): Background of Reactive Programming

Reactive programming is fun and is being discussed in all sorts of places, but its concepts are not easy to grasp. This article introduces the related concepts in a concrete way. Reac...

In spring boot, Mar 04, 2018

Using AOP in a Spring Boot Project

1. Overview

In spring boot, Feb 18, 2018

How to Avoid Memory Leaks in Java Programs

Although the JVM has garbage collection, Java programs can still leak memory if the code does not follow certain rules, eventually leading to an OutOfMemory error.

In java, Jan 27, 2018

How Programs Keep Running in the Background: Principles and Methods

In Linux, processes are organized into sessions: a session contains one foreground process group and one or more background process groups, and a process group contains multiple proce...

In linux, Jun 11, 2017

Exception Handling for REST APIs in Spring Boot

1. HTTP Status Codes

In spring boot, May 21, 2017