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 服务连接 文档页面。