spring-ai-starter-vector-store-pgvector doesn't work without spring-boot-starter-jdbc
Bug description When using spring-ai-starter-vector-store-pgvector as described here https://docs.spring.io/spring-ai/reference/2.0/api/vectordbs/pgvector.html
APPLICATION FAILED TO START
Description:
Parameter 0 of method vectorStore in org.springframework.ai.vectorstore.pgvector.autoconfigure.PgVectorStoreAutoConfiguration required a bean of type 'org.springframework.jdbc.core.JdbcTemplate' that could not be found.
Environment spring-ai 2.0.0-M7
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-starter-vector-store-pgvector</artifactId>
</dependency>
Hi, I can try to reproduce this.
Looks like PgVectorStoreAutoConfiguration needs a JdbcTemplate, but with only spring-ai-starter-vector-store-pgvector added, the JDBC setup may not be created automatically.
I’ll check it with a minimal Spring Boot project on 2.0.0-M7 and see whether this is a starter dependency issue or something that should be clearer in the docs.
I was able to reproduce this issue on 2.0.0-M7.
It seems PgVectorStoreAutoConfiguration requires a JdbcTemplate, but spring-ai-starter-vector-store-pgvector does not bring in spring-boot-starter-jdbc, so the application fails to start with the documented setup.
I’d like to work on a fix for this.