<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>structured concurrency on </title>
    <link>/tags/structured-concurrency/</link>
    <description>Recent content in structured concurrency on </description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Thu, 05 Mar 2026 07:00:00 +0800</lastBuildDate><atom:link href="/tags/structured-concurrency/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>用 Java 25 &#43; Spring AI 构建新加坡小学数学 AI 辅导 App — Phase 1 实战记录</title>
      <link>/posts/sg-math-tutor-phase1-java25-spring-ai/</link>
      <pubDate>Thu, 05 Mar 2026 07:00:00 +0800</pubDate>
      
      <guid>/posts/sg-math-tutor-phase1-java25-spring-ai/</guid>
      <description>项目背景 我正在开发一个面向新加坡 2026 PSLE 考纲的小学数学 AI 辅导 App。当前设计里我最看重的是：
使用新加坡教育部推崇的 CPA (Concrete-Pictorial-Abstract) 教学法 多 Agent 协作：Planner → CPA Designer + Persona 并行处理 为家长和孩子分别生成不同语气的解题指导 技术栈选型比较激进：Java 25 + Spring Boot 4.0 + Spring AI 2.0 + Ollama 本地模型。这篇文章记录 Phase 1 的搭建过程和踩过的坑。
架构概览 graph TD A[SolveRequest - question, grade P1-P6] --&gt; B[Planner Agent - 分析题目,提取知识点,生成步骤] B --&gt; C{StructuredTaskScope.fork} C --&gt; D[CPA Designer - 生成 Bar Model - 可视化描述] C --&gt; E[Persona Agent - 家长版 + 儿童版 - 双语气输出] D --&gt; F[SolveResult] E --&gt; F F --&gt; G[parentGuide] F --&gt; H[childScript] F --&gt; I[barModelJson] F --&gt; J[knowledgeTags] classDef request fill:#ffffff,stroke:#1976d2,stroke-width:3px,color:#0d47a1 classDef agent fill:#ffffff,stroke:#f57c00,stroke-width:3px,color:#e65100 classDef result fill:#ffffff,stroke:#388e3c,stroke-width:3px,color:#2e7d32 classDef scope fill:#fff3e0,stroke:#f57c00,stroke-width:2px,color:#e65100 class A request class B,D,E agent class C scope class F,G,H,I,J result Planner 先跑，分析题目后输出结构化 JSON，然后 CPA Designer 和 Persona 两个 Agent 并发执行。并发使用的是 Java 25 的 Structured Concurrency（StructuredTaskScope）。</description>
    </item>
    
  </channel>
</rss>
