👉 這是一個或許對你有用的社群
《專案實戰(影片)》:從書中學,往事上“練” 《網際網路高頻面試題》:面朝簡歷學習,春暖花開 《架構 x 系統設計》:摧枯拉朽,掌控面試高頻場景題 《精進 Java 學習指南》:系統學習,網際網路主流技術棧 《必讀 Java 原始碼專欄》:知其然,知其所以然

👉這是一個或許對你有用的開源專案國產 Star 破 10w+ 的開源專案,前端包括管理後臺 + 微信小程式,後端支援單體和微服務架構。功能涵蓋 RBAC 許可權、SaaS 多租戶、資料許可權、商城、支付、工作流、大屏報表、微信公眾號、ERP、CRM、AI 大模型等等功能:
Boot 多模組架構:https://gitee.com/zhijiantianya/ruoyi-vue-pro Cloud 微服務架構:https://gitee.com/zhijiantianya/yudao-cloud 影片教程:https://doc.iocoder.cn 【國內首批】支援 JDK 17/21 + SpringBoot 3.3、JDK 8/11 + Spring Boot 2.7 雙版本
前序
基於 Spring Boot + MyBatis Plus + Vue & Element 實現的後臺管理系統 + 使用者小程式,支援 RBAC 動態許可權、多租戶、資料許可權、工作流、三方登入、支付、簡訊、商城等功能
專案地址:https://github.com/YunaiV/ruoyi-vue-pro 影片教程:https://doc.iocoder.cn/video/
開發你的AI程式


<properties>
<java.version>
17
</java.version>
<spring-ai.version>
1.0.0-M5
</spring-ai.version>
<maven.compiler.source>
17
</maven.compiler.source>
<maven.compiler.target>
17
</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.ai
</groupId>
<artifactId>
spring-ai-openai-spring-boot-starter
</artifactId>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>
org.springframework.ai
</groupId>
<artifactId>
spring-ai-bom
</artifactId>
<version>
${spring-ai.version}
</version>
<type>
pom
</type>
<scope>
import
</scope>
</dependency>
</dependencies>
</dependencyManagement>

https://cloud.siliconflow.cn/i/pCa1dBVX


spring:
ai:
openai:
api-key:這裡是你自己的apikey
base-url:https://api.siliconflow.cn
chat:
options:
model:deepseek-ai/DeepSeek-R1-Distill-Llama-8B
model: deepseek-ai/DeepSeek-R1-Distill-Llama-8B
這個模型,就是矽基流動模型廣場選擇的模型名稱
package
com.summer.springai.controller;
import
groovy.util.logging.Slf4j;
import
org.springframework.ai.chat.client.ChatClient;
import
org.springframework.web.bind.annotation.*;
@RestController
@CrossOrigin
(origins =
"*"
)
@Slf
4j
publicclassChatBotController
{
privatefinal
ChatClient chatClient;
publicChatBotController(ChatClient.Builder builder)
{
this
.chatClient = builder.defaultSystem(
"你是一個天氣預報員,當有人輸入日期的時候,你輸出蘇州的天氣預報資訊,"
+
"生成結果在html頁面中以markdown的格式輸出,最後輸出結尾的時候始終以下面的語句結尾:感謝您的諮詢,我是輿情君。"
).build();
}
@GetMapping
(value =
"/chat/{message}"
)
public String chat(@PathVariable("message") String message)
{
return
chatClient.prompt()
.user(message)
.call()
.content();
}
}
http://localhost:8080/ai/chat/2025年2月12日






