tag : Java

Spring Boot 3.5虚拟线程 + LangChain4j:构建百万级并发AI Agent系统

2025年,Java生态系统正在经历一场并发编程的革命。Spring Boot 3.5引入的虚拟线程支持,结合LangChain4j这一强大的AI框架,为构建大规模并发AI Agent系统开辟了全新的可能性。如果你还在为传统线程池的资源限制而苦恼,或者在思考如何优雅地处理数千个并发AI请求,那么这篇文章将为你提供完整的解决方案。

C++与Java编译时循环依赖对比及Java工程师C++适配指南

1. 引言本报告旨在深入剖析C++和Java两种主流编程语言在处理编译时循环依赖问题上的机制差异,并为有经验的Java工程师转向C++开发提供一套全面、实用的适配指南。内容整合了多方面的研究成果,力求信息准确、结构清晰,以期成为一份高质量的技术参考文档。

Migrate to MongoDB from MariaDB for SaltyNote Service

As a software engineer, I think everyone can tell thousands of words about the differences between SQL vs NoSQL. And how to make a choice between them with your requirement. Recently, I migrated the SaltyNote service from MariaDB to MongoDB. While the reason is not for high throughput or performance.

SaltyNote Implementation - Service

SaltyNote is a Chrome Extension that provides the immersive page notes taken experience. The users can view all the notes taken on the current page from the right sidebar without leaving the page. In this article, I will introduce the implementation of the SaltyNote service.

Quick start: swagger, spring-boot and Jersey

在做服务器端API开发的时候,如何保持文档的更新是一个比较头疼的问题。试过写成word文档,缺点很明显: 更新不及时 不便于查阅 也试过用其他的在线API管理工具,太懒了,总是无法保持更新。而且大多数服务还是收费的。

Java: JDK居然有个叫整型池的东西

其实下面这些个assert语句都可以通过junit测试。 12345678@Testpublic void integerValueOfTest() { Assert.assertTrue(Integer.valueOf(-128) == Integer.valueOf(-128)); Assert.assertFalse(Integer.valueOf(128) == Integer.valueOf(128)); Assert.assertTrue(Integer.valueOf(127) == Integer.valueOf(127)); Assert.assertTrue(Integer.valueOf(1) == Integer.valueOf(1)); Assert.assertFalse(Integer.valueOf(1000) == Integer.valueOf(1000));}

Java Mail中文乱码

由于长时间在自己coding中处理英文内容,导致今天发现自己在做的一单网站在给用户发新密码邮件的时候居然中文乱码。(原来我每天都说的中文在我写代码的时候被忽略了)

Java: Test a file is image or not

There are many ways to check whether a file is image. For example, check the file extension(jpg, png, gif …). But this is not so safe, in a web environment, user may rename XXX.exe, to XXX.jpg, then s/he can succeed to upload it. In this case, it can induce security problem.

Design Pattern: Decorator & Proxy

I think it is better to master 23 Design Patterns as a Java developer. After I have a brief study, I find design pattern is not a new concept, and I have already used some of them in my daily projects unconsciously. Here I will describe some details about Decorator and Proxy, as I find they share something in common.