Sfoglia il codice sorgente

docs:更新AGENTS.md构建说明与结构;标记todo任务完成

yangyi 1 settimana fa
parent
commit
a45e499b1c
2 ha cambiato i file con 18 aggiunte e 9 eliminazioni
  1. 13 4
      AGENTS.md
  2. 5 5
      todo.md

+ 13 - 4
AGENTS.md

@@ -7,16 +7,24 @@ Java 17 / Maven tutorial project for JDK `CompletableFuture` API. Produces Chine
 ## Build & Run
 
 ```bash
-mvn compile           # compile
-mvn exec:java         # run Main.main()
-mvn test              # run tests (currently none)
+mvn compile                                          # compile
+mvn exec:java -Dexec.mainClass=space.anyi.Cf01_CreateStage   # run a demo (pick a Cf* class)
+mvn test                                              # run tests (currently none)
 ```
 
+- `exec:java` requires `-Dexec.mainClass` (the pom does not configure a default `mainClass`).
+- In this environment `mvn` may not be on PATH. Use the IntelliJ-bundled Maven:
+  `C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2023.3.8\plugins\maven\lib\maven3\bin`
+- PowerShell splits unquoted `-Dexec.mainClass=...`; quote the argument: `'-Dexec.mainClass=space.anyi.Cf01_CreateStage'`.
+- Console shows GBK encoding by default, so Chinese output may look garbled in terminal even though the program is correct.
+
 No other build tools, linters, or formatters are configured.
 
 ## Structure
 
-- `src/main/java/space/anyi/` — demo code
+- `src/main/java/space/anyi/` — demo code (`Cf01`..`Cf09`, one file per API topic, each with a standalone `main()`)
+- `completablefuture-tutorial.md` — tutorial doc (Chinese, follows `template.md` style)
+- `completablefuture-blog.md` — blog/cheat-sheet doc for experienced Java programmers
 - `template.md` — reference doc for writing style and structure (Chinese, covers JUC concurrency topics)
 - `todo.md` — task list for outstanding work
 
@@ -26,3 +34,4 @@ No other build tools, linters, or formatters are configured.
 - Package: `space.anyi`
 - All tutorial prose is in Chinese.
 - Code examples should be self-contained and runnable as standalone `main()` methods.
+- Commit to the local git repository after completing each small task (e.g., each demo file, each document).

+ 5 - 5
todo.md

@@ -1,6 +1,6 @@
 # JDK CompletableFeature API使用教程
-> 参考 template.md 的文档结构和叙述风格 
-- 每个API的代码案例
-- 每个API使用场景
-- 整理教程文档
-- 整理blog文档(读者为Java程序员)
+> 参考 template.md 的文档结构和叙述风格
+- [x] 每个API的代码案例 (src/main/java/space/anyi/Cf01~Cf09,每个 API 主题一个自包含 main())
+- [x] 每个API使用场景 (教程各章节「使用场景」小节 + 第十章速查表)
+- [x] 整理教程文档 (completablefuture-tutorial.md)
+- [x] 整理blog文档(读者为Java程序员)(completablefuture-blog.md)