https://github.com/guoshiqiufeng/dify-spring-boot-starter
Provide springboot starter for dify to simplify development.
https://github.com/guoshiqiufeng/dify-spring-boot-starter
dify dify-chat dify-dataset dify-java dify-knowledge dify-sdk-java dify-spring-boot-starter
Last synced: about 2 months ago
JSON representation
Provide springboot starter for dify to simplify development.
- Host: GitHub
- URL: https://github.com/guoshiqiufeng/dify-spring-boot-starter
- Owner: guoshiqiufeng
- License: apache-2.0
- Created: 2025-03-07T07:05:17.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-04-08T11:22:11.000Z (about 2 months ago)
- Last Synced: 2025-04-08T12:26:26.195Z (about 2 months ago)
- Topics: dify, dify-chat, dify-dataset, dify-java, dify-knowledge, dify-sdk-java, dify-spring-boot-starter
- Language: Java
- Homepage: https://guoshiqiufeng.github.io/dify-spring-boot-starter/en
- Size: 626 KB
- Stars: 15
- Watchers: 1
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README-zh.md
- License: LICENSE
Awesome Lists containing this project
README
## dify-spring-boot-starter
[](https://search.maven.org/search?q=g:io.github.guoshiqiufeng.dify%20AND%20a:dify-spring-boot-starter)
[](http://www.apache.org/licenses/LICENSE-2.0.html)
[](https://github.com/guoshiqiufeng/dify-spring-boot-starter/actions/workflows/github-code-scanning/codeql)阅读其他语言版本: [English](README.md)
### 介绍
为dify提供 springboot starter,简化开发
### 文档
- https://guoshiqiufeng.github.io/dify-spring-boot-starter/
### 开发框架
- Spring Boot 3
### 运行最低版本
- Spring Boot 3
- Java 17### 功能
- 聊天
- 后台
- 工作流
- 知识库### 使用
#### 引入统一版本依赖,不用再使用时指定版本号
```xml
io.github.guoshiqiufeng.dify
dify-bom
0.7.2
import
```
#### 引入starter依赖
```xml
io.github.guoshiqiufeng.dify
dify-spring-boot-starter```
#### yml 配置
```yaml
dify:
url: http://192.168.1.10 # 请替换为实际的 Dify 服务地址
server:
email: [email protected] # 请替换为实际的 Dify 服务邮箱,若不需要调用 server相关接口可不填
password: admin123456 # 请替换为实际的 Dify 服务密码,若不需要调用 server相关接口可不填
dataset:
api-key: dataset-aaabbbcccdddeeefffggghhh # 请替换为实际的知识库api-key, 若不需要调用知识库可不填
```#### 获取消息建议
```java
@Service
public class DifyChatService {@Resource
private DifyChat difyChat;public List messagesSuggested(String messageId, String apiKey, String userId) {
return difyChat.messagesSuggested(messageId, apiKey, userId);
}
}
```更多使用参考查看
- [文档](https://guoshiqiufeng.github.io/dify-spring-boot-starter)
- [examples](https://github.com/guoshiqiufeng/dify-spring-boot-starter-examples)## Star History
[](https://www.star-history.com/#guoshiqiufeng/dify-spring-boot-starter&Date)