Docker Compose

Spring AI provides Spring Boot auto-configuration for establishing a connection to a model service or vector store running via Docker Compose. To enable it, add the following dependency to your project’s Maven pom.xml file:spring-doc.cn

<dependency>
   <groupId>org.springframework.ai</groupId>
   <artifactId>spring-ai-spring-boot-docker-compose</artifactId>
</dependency>

or to your Gradle build.gradle build file.spring-doc.cn

dependencies {
    implementation 'org.springframework.ai:spring-ai-spring-boot-docker-compose'
}
Refer to the Dependency Management section to add the Spring AI BOM to your build file.

Service Connections

The following service connection factories are provided in the spring-ai-spring-boot-docker-compose module:spring-doc.cn

Connection Detailsspring-doc.cn

Matched onspring-doc.cn

AwsOpenSearchConnectionDetailsspring-doc.cn

Containers named localstack/localstackspring-doc.cn

ChromaConnectionDetailsspring-doc.cn

Containers named chromadb/chroma, ghcr.io/chroma-core/chromaspring-doc.cn

MongoConnectionDetailsspring-doc.cn

Containers named mongodb/mongodb-atlas-localspring-doc.cn

OllamaConnectionDetailsspring-doc.cn

Containers named ollama/ollamaspring-doc.cn

OpenSearchConnectionDetailsspring-doc.cn

Containers named opensearchproject/opensearchspring-doc.cn

QdrantConnectionDetailsspring-doc.cn

Containers named qdrant/qdrantspring-doc.cn

TypesenseConnectionDetailsspring-doc.cn

Containers named typesense/typesensespring-doc.cn

WeaviateConnectionDetailsspring-doc.cn

Containers named semitechnologies/weaviate, cr.weaviate.io/semitechnologies/weaviatespring-doc.cn