Skip to content

Commit ed1221e

Browse files
committed
Migrate weaviate store auto-config to its own module
Signed-off-by: Soby Chacko <[email protected]>
1 parent b97531b commit ed1221e

File tree

17 files changed

+198
-16
lines changed

17 files changed

+198
-16
lines changed
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~ Copyright 2023-2025 the original author or authors.
4+
~
5+
~ Licensed under the Apache License, Version 2.0 (the "License");
6+
~ you may not use this file except in compliance with the License.
7+
~ You may obtain a copy of the License at
8+
~
9+
~ https://www.apache.org/licenses/LICENSE-2.0
10+
~
11+
~ Unless required by applicable law or agreed to in writing, software
12+
~ distributed under the License is distributed on an "AS IS" BASIS,
13+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
~ See the License for the specific language governing permissions and
15+
~ limitations under the License.
16+
-->
17+
18+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19+
xmlns="http://maven.apache.org/POM/4.0.0"
20+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
21+
<modelVersion>4.0.0</modelVersion>
22+
<parent>
23+
<groupId>org.springframework.ai</groupId>
24+
<artifactId>spring-ai</artifactId>
25+
<version>1.0.0-SNAPSHOT</version>
26+
<relativePath>../../../pom.xml</relativePath>
27+
</parent>
28+
<artifactId>spring-ai-weaviate-store-spring-boot-autoconfigure</artifactId>
29+
<packaging>jar</packaging>
30+
<name>Spring AI Auto Configuration for Weaviate vector store</name>
31+
<description>Spring AI Auto Configuration for Weaviate vector store</description>
32+
<url>https://github.com/spring-projects/spring-ai</url>
33+
34+
<scm>
35+
<url>https://github.com/spring-projects/spring-ai</url>
36+
<connection>git://github.com/spring-projects/spring-ai.git</connection>
37+
<developerConnection>[email protected]:spring-projects/spring-ai.git</developerConnection>
38+
</scm>
39+
40+
<dependencies>
41+
<!-- production dependencies -->
42+
<dependency>
43+
<groupId>org.springframework.ai</groupId>
44+
<artifactId>spring-ai-weaviate-store</artifactId>
45+
<version>${project.parent.version}</version>
46+
<optional>true</optional>
47+
</dependency>
48+
<dependency>
49+
<groupId>org.springframework.boot</groupId>
50+
<artifactId>spring-boot-starter</artifactId>
51+
</dependency>
52+
<dependency>
53+
<groupId>org.springframework.boot</groupId>
54+
<artifactId>spring-boot-configuration-processor</artifactId>
55+
<optional>true</optional>
56+
</dependency>
57+
<!-- test dependencies -->
58+
<dependency>
59+
<groupId>org.springframework.ai</groupId>
60+
<artifactId>spring-ai-test</artifactId>
61+
<version>${project.parent.version}</version>
62+
<scope>test</scope>
63+
</dependency>
64+
<dependency>
65+
<groupId>org.springframework.boot</groupId>
66+
<artifactId>spring-boot-starter-test</artifactId>
67+
<scope>test</scope>
68+
</dependency>
69+
<dependency>
70+
<groupId>org.springframework.boot</groupId>
71+
<artifactId>spring-boot-testcontainers</artifactId>
72+
<scope>test</scope>
73+
</dependency>
74+
<dependency>
75+
<groupId>org.testcontainers</groupId>
76+
<artifactId>testcontainers</artifactId>
77+
<scope>test</scope>
78+
</dependency>
79+
<dependency>
80+
<groupId>org.testcontainers</groupId>
81+
<artifactId>junit-jupiter</artifactId>
82+
<scope>test</scope>
83+
</dependency>
84+
<dependency>
85+
<groupId>org.awaitility</groupId>
86+
<artifactId>awaitility</artifactId>
87+
<scope>test</scope>
88+
</dependency>
89+
<dependency>
90+
<groupId>org.testcontainers</groupId>
91+
<artifactId>weaviate</artifactId>
92+
<scope>test</scope>
93+
</dependency>
94+
<dependency>
95+
<groupId>org.springframework.ai</groupId>
96+
<artifactId>spring-ai-transformers</artifactId>
97+
<version>${project.parent.version}</version>
98+
<scope>test</scope>
99+
</dependency>
100+
</dependencies>
101+
</project>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023-2024 the original author or authors.
2+
* Copyright 2023-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.ai.autoconfigure.vectorstore.weaviate;
17+
package org.springframework.ai.autoconfigure.vectorestore.weaviate;
1818

1919
import org.springframework.boot.autoconfigure.service.connection.ConnectionDetails;
2020

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023-2024 the original author or authors.
2+
* Copyright 2023-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.ai.autoconfigure.vectorstore.weaviate;
17+
package org.springframework.ai.autoconfigure.vectorestore.weaviate;
1818

1919
import io.micrometer.observation.ObservationRegistry;
2020
import io.weaviate.client.Config;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023-2024 the original author or authors.
2+
* Copyright 2023-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.ai.autoconfigure.vectorstore.weaviate;
17+
package org.springframework.ai.autoconfigure.vectorestore.weaviate;
1818

1919
import java.util.Map;
2020

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#
2+
# Copyright 2025-2025 the original author or authors.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# https://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
org.springframework.ai.autoconfigure.vectorestore.weaviate.WeaviateVectorStoreAutoConfiguration
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.ai.autoconfigure.vectorstore.weaviate;
17+
package org.springframework.ai.autoconfigure.vectorestore.weaviate;
1818

1919
import java.util.List;
2020
import java.util.Map;
@@ -32,15 +32,15 @@
3232
import org.springframework.ai.transformers.TransformersEmbeddingModel;
3333
import org.springframework.ai.vectorstore.SearchRequest;
3434
import org.springframework.ai.vectorstore.VectorStore;
35-
import org.springframework.ai.vectorstore.weaviate.WeaviateVectorStore.MetadataField;
3635
import org.springframework.ai.vectorstore.observation.VectorStoreObservationContext;
36+
import org.springframework.ai.vectorstore.weaviate.WeaviateVectorStore.MetadataField;
3737
import org.springframework.boot.autoconfigure.AutoConfigurations;
3838
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
3939
import org.springframework.context.annotation.Bean;
4040
import org.springframework.context.annotation.Configuration;
4141

4242
import static org.assertj.core.api.Assertions.assertThat;
43-
import static org.springframework.ai.autoconfigure.vectorstore.observation.ObservationTestUtil.assertObservationRegistry;
43+
import static org.springframework.ai.test.vectorstore.ObservationTestUtil.assertObservationRegistry;
4444

4545
/**
4646
* @author Christian Tzolov

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939

4040
<module>auto-configurations/spring-ai-mcp-client</module>
4141
<module>auto-configurations/spring-ai-mcp-server</module>
42+
<module>auto-configurations/vector-stores/spring-ai-weaviate-store-spring-boot-autoconfigure</module>
4243

4344
<module>spring-ai-retry</module>
4445
<module>spring-ai-spring-boot-docker-compose</module>

spring-ai-spring-boot-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ org.springframework.ai.autoconfigure.vectorstore.milvus.MilvusVectorStoreAutoCon
3636
org.springframework.ai.autoconfigure.vectorstore.redis.RedisVectorStoreAutoConfiguration
3737
org.springframework.ai.autoconfigure.vectorstore.chroma.ChromaVectorStoreAutoConfiguration
3838
org.springframework.ai.autoconfigure.vectorstore.azure.AzureVectorStoreAutoConfiguration
39-
org.springframework.ai.autoconfigure.vectorstore.weaviate.WeaviateVectorStoreAutoConfiguration
39+
org.springframework.ai.autoconfigure.vectorestore.weaviate.WeaviateVectorStoreAutoConfiguration
4040
org.springframework.ai.autoconfigure.vectorstore.neo4j.Neo4jVectorStoreAutoConfiguration
4141
org.springframework.ai.autoconfigure.vectorstore.qdrant.QdrantVectorStoreAutoConfiguration
4242
org.springframework.ai.autoconfigure.vectorstore.hanadb.HanaCloudVectorStoreAutoConfiguration

spring-ai-spring-boot-docker-compose/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@
4747
<version>${project.parent.version}</version>
4848
</dependency>
4949

50+
<dependency>
51+
<groupId>org.springframework.ai</groupId>
52+
<artifactId>spring-ai-weaviate-store-spring-boot-autoconfigure</artifactId>
53+
<version>${project.parent.version}</version>
54+
</dependency>
55+
5056
<dependency>
5157
<groupId>com.google.protobuf</groupId>
5258
<artifactId>protobuf-java</artifactId>

spring-ai-spring-boot-docker-compose/src/main/java/org/springframework/ai/docker/compose/service/connection/weaviate/WeaviateDockerComposeConnectionDetailsFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
package org.springframework.ai.docker.compose.service.connection.weaviate;
1818

19-
import org.springframework.ai.autoconfigure.vectorstore.weaviate.WeaviateConnectionDetails;
19+
import org.springframework.ai.autoconfigure.vectorestore.weaviate.WeaviateConnectionDetails;
2020
import org.springframework.boot.docker.compose.core.RunningService;
2121
import org.springframework.boot.docker.compose.service.connection.DockerComposeConnectionDetailsFactory;
2222
import org.springframework.boot.docker.compose.service.connection.DockerComposeConnectionSource;

0 commit comments

Comments
 (0)