# caibi **Repository Path**: ccSerein/caibi ## Basic Information - **Project Name**: caibi - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-11-16 - **Last Updated**: 2024-10-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 快速上手 > 所有需要修改的地方都标记了 `todo`,便于大家找到修改的位置~ ### MySQL 数据库 1)修改 `application.yml` 的数据库配置为你自己的: ```yml spring: datasource: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://localhost:3306/my_db username: root password: 123456 ``` 2)执行 `sql/create_table.sql` 中的数据库语句,自动创建库表 3)启动项目,访问 `http://localhost:8101/api/doc.html` 即可打开接口文档,不需要写前端就能在线调试接口了~ ![](doc/swagger.png) ### Redis 分布式登录 1)修改 `application.yml` 的 Redis 配置为你自己的: ```yml spring: redis: database: 1 host: localhost port: 6379 timeout: 5000 password: 123456 ``` 2)修改 `application.yml` 中的 session 存储方式: ```yml spring: session: store-type: redis ``` 3)移除 `MainApplication` 类开头 `@SpringBootApplication` 注解内的 exclude 参数: 修改前: ```java @SpringBootApplication(exclude = {RedisAutoConfiguration.class}) ``` 修改后: ```java @SpringBootApplication ``` ### ai 配置 1)修改 `application.yml` 的 gear.wenxin 和 yuapi.client 配置为你自己的: ```yml gear: wenxin: model-url: 选择模型的 url api-key: 你的 accessKey secret-key: 你的 secretKey ``` ```yml yuapi: client: access-key: 你的 accessKey secret-key: 你的 secretKey ``` 选择文心一言模型url可以 [看这里](https://cloud.baidu.com/doc/WENXINWORKSHOP/s/vlpteyv3c)