diff --git a/README.md b/README.md
index cba16ed..fbc0293 100644
--- a/README.md
+++ b/README.md
@@ -101,6 +101,11 @@ spring.ai.deepseek.chat.options.model=deepseek-chat
```
将你的 `spring.ai.deepseek.api-key` 替换为实际的 API 密钥即可启动运行。关于如何申请 api key ,可以移步项目 [Wiki 页面](https://github.com/java-ai-tech/spring-ai-summary/wiki)进行查看。
+有一个一劳永逸的办法,将对应的spring.ai.deepseek.api-key添加到对应环境变量中,后续启动时会带进来,不用再去修改代码了对应的application.yml,不用担心提交代码泄露key
+将IDEA启动项中的环境变量添加spring.ai.openai.api-key=sk-***************(你自己对应的 key),运行项目时,会自动带入环境变量。
+不过对应的子module每个模块都需要配置
+
+
### 3. ▶️ 运行示例
完成上述步骤后,你可以选择运行不同的示例模块来体验 Spring AI 的功能。如启动运行 **spring-ai-chat-deepseek** 模块(具体端口可以根据你自己的配置而定):
diff --git a/README_EN.md b/README_EN.md
index 855e405..c59da1e 100644
--- a/README_EN.md
+++ b/README_EN.md
@@ -98,6 +98,11 @@ spring.ai.deepseek.chat.options.model=deepseek-chat
```
Replace `spring.ai.deepseek.api-key` with your actual API key to start the service. For how to apply for an API key, see the project [Wiki page](https://github.com/java-ai-tech/spring-ai-summary/wiki).
+There's a one-time setup solution: add the spring.ai.deepseek.api-key to your environment variables. This will be automatically loaded during subsequent application startups without needing code modifications in application.yml, eliminating concerns about accidentally committing the code and exposing the key.
+
+In IntelliJ IDEA's launch configuration, add the environment variable spring.ai.openai.api-key=sk-***************(your_actual_key). The project will automatically include this environment variable when running.
+
+Note: Each submodule requires separate configuration for this setting.
### 3. ▶️ Run Examples
After the above steps, you can run different modules to experience Spring AI features. For example, to start **spring-ai-chat-deepseek** (port may vary):
diff --git a/spring-ai-mcp/mcp-client/pom.xml b/spring-ai-mcp/mcp-client/pom.xml
index f39a9e6..c3ad84e 100644
--- a/spring-ai-mcp/mcp-client/pom.xml
+++ b/spring-ai-mcp/mcp-client/pom.xml
@@ -19,6 +19,11 @@
httpclient5
5.4.3
+
+ org.apache.httpcomponents.core5
+ httpcore5
+ 5.3.4
+
org.springframework.ai
diff --git a/spring-ai-mcp/mcp-client/src/main/resources/application.yaml b/spring-ai-mcp/mcp-client/src/main/resources/application.yaml
index 801598b..93df710 100644
--- a/spring-ai-mcp/mcp-client/src/main/resources/application.yaml
+++ b/spring-ai-mcp/mcp-client/src/main/resources/application.yaml
@@ -6,11 +6,14 @@ spring:
name: mcp-client
profiles:
active: mcp-client
- ai:
- openai:
- api-key: sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- chat:
- base-url: https://api.deepseek.com
- completions-path: /v1/chat/completions
- options:
- model: deepseek-chat
+ ai:
+ openai:
+ api-key: ${spring.ai.openai.api-key}
+ chat:
+# base-url: https://api.deepseek.com
+ base-url: https://dashscope.aliyuncs.com/compatible-mode
+# completions-path: /v1/chat/completions
+ completions-path: /v1/chat/completions
+ options:
+# model: deepseek-chat
+ model: qwen-plus
\ No newline at end of file