in my project, ignite with spring boot 2.1.x cause some problems like you. please use spring boot 2.0.9 h2-version:1.4.197
At 2019-12-24 09:01:29, "Denis Magda" <[email protected]> wrote: Michele, If wasn't checking the source code of the Ignite integration but believe you need to pass on the whole SQL query into @Query annotation. Here are some samples: https://apacheignite-mix.readme.io/docs/spring-data#section-apache-ignite-repository Generally, what's the reason for setting @Query("subscriberId = ?") if the signature of the method (getPresenceBySubscriberId(long subscriberId) already assumes the data will be filtered by the parameter? Can't you just remove @Query("subscriberId = ?") and get the same effect? - Denis On Mon, Jun 10, 2019 at 3:06 AM Pedrotti Michele <[email protected]> wrote: Hi, I have a SpringBoot’s application 2.1.X and a simple local installation of ignite 2.7.0. I have problems when I add to my Repository two simple query methods (without this methods I don’t have problems, the simple call to “repo.findById” works correctly) like this: @RepositoryConfig(cacheName = IgniteConfig.CACHE_NAME) publicinterface PresenceRepository extends IgniteRepository<PresenceStateEntity, String> { @Query("subscriberId = ?") List<PresenceStateEntity> getPresenceBySubscriberId(longsubscriberId); @Query("brasIp = ?") List<PresenceStateEntity> getPresenceByBrasIp(String brasIp); } I am using ignite-spring-data_2.0 , spring-data-commons: 2.0.9 , ignite-spring 2.7.0… The exception is : Caused by: 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! at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.<init>(RepositoryFactorySupport.java:545) at org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:324) at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.lambda$afterPropertiesSet$5(RepositoryFactoryBeanSupport.java:297) at org.springframework.data.util.Lazy.getNullable(Lazy.java:211) at org.springframework.data.util.Lazy.get(Lazy.java:94) at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.afterPropertiesSet(RepositoryFactoryBeanSupport.java:300) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1804) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1741) ... 58 more Thanks Michele | Questo messaggio e i suoi allegati sono indirizzati esclusivamente alle persone indicate. La diffusione, copia o qualsiasi altra azione derivante dalla conoscenza di queste informazioni sono rigorosamente vietate. Qualora abbiate ricevuto questo documento per errore siete cortesemente pregati di darne immediata comunicazione al mittente e di provvedere alla sua distruzione, Grazie. This e-mail and any attachments is confidential and may contain privileged information intended for the addressee(s) only. Dissemination, copying, printing or use by anybody else is unauthorised. If you are not the intended recipient, please delete this message and any attachments and advise the sender by return e-mail, Thanks. Rispetta l'ambiente. Non stampare questa mail se non è necessario. |
