VanRoy / spring-data-jest

Spring Data Implementation for Jest
Apache License 2.0
226 stars 78 forks source link

You have defined query method in the repository but you don't have any query lookup strategy defined #129

Closed Zuckonit closed 4 years ago

Zuckonit commented 4 years ago

env

springboot 2.0.9.RELEASE jest 6.3.1 spring-boot-starter-data-jest: 3.2.5.RELEASE

error

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'alertRepository': Invocation of init method failed; nested exception is java.lang.IllegalStateException: You have defined query method in the repository but you don't have any query lookup strategy defined. The infrastructure apparently does not support query methods!

seems cannot use @Query

VanRoy commented 4 years ago

Hi @Zuckonit , Is "@Query" the only things that doesn't work or other elasticsearch feature work fine ( like save, findByXXX) ?

VanRoy commented 4 years ago

@Zuckonit Can you provide us an update for this issue ?

Zuckonit commented 4 years ago

yes only query

VanRoy commented 4 years ago

Hi @Zuckonit It's seem's that it could be an dependencies conflict.

Indeed, spring-boot-starter-data-jest 3.2.5.RELEASE target SpringBoot 2.1 not 2.0.x.

So spring-data-elasticsearch and spring-data-commons not match.

Try to add this property to your maven / gradle project to override spring-data version :

spring-data-releasetrain.version = Lovelace-SR17