Testcontainers
Spring AI 提供了 Spring Boot 自動配置,用於建立與透過 Testcontainers 執行的模型服務或向量儲存的連線。要啟用它,請將以下依賴項新增到您專案的 Maven pom.xml 檔案中。
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-spring-boot-testcontainers</artifactId>
</dependency>
或新增到您的 Gradle build.gradle 構建檔案中。
dependencies {
implementation 'org.springframework.ai:spring-ai-spring-boot-testcontainers'
}
| 請參閱依賴管理部分,將 Spring AI BOM 新增到您的構建檔案。 |
服務連線
spring-ai-spring-boot-testcontainers 模組中提供了以下服務連線工廠
| 連線詳細資訊 | 匹配物件 |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
更多服務連線由 spring boot 模組 spring-boot-testcontainers 提供。有關完整列表,請參閱 Testcontainers 服務連線 文件頁面。